diff --git a/xiaofang/Assets/Prefabs/YHJ.meta b/xiaofang/Assets/Prefabs/YHJ.meta new file mode 100644 index 00000000..dfae146c --- /dev/null +++ b/xiaofang/Assets/Prefabs/YHJ.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: 05ce929c271f11245b148e1b0d6f3983 +folderAsset: yes +DefaultImporter: + externalObjects: {} + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Prefabs/YHJ/2.fbx b/xiaofang/Assets/Prefabs/YHJ/2.fbx new file mode 100644 index 00000000..51a27666 Binary files /dev/null and b/xiaofang/Assets/Prefabs/YHJ/2.fbx differ diff --git a/xiaofang/Assets/Prefabs/YHJ/2.fbx.meta b/xiaofang/Assets/Prefabs/YHJ/2.fbx.meta new file mode 100644 index 00000000..4eee5e6d --- /dev/null +++ b/xiaofang/Assets/Prefabs/YHJ/2.fbx.meta @@ -0,0 +1,112 @@ +fileFormatVersion: 2 +guid: ffc8f56811d7ca145812ba1f6a4be23a +ModelImporter: + serializedVersion: 21300 + internalIDToNameTable: [] + externalObjects: + - first: + type: UnityEngine:Material + assembly: UnityEngine.CoreModule + name: XFS + second: {fileID: 2100000, guid: fc2433cf1854ce540bed03bfea6c3e55, type: 2} + materials: + materialImportMode: 2 + materialName: 0 + materialSearch: 1 + materialLocation: 1 + animations: + legacyGenerateAnimations: 4 + bakeSimulation: 0 + resampleCurves: 1 + optimizeGameObjects: 0 + removeConstantScaleCurves: 1 + motionNodeName: + rigImportErrors: + rigImportWarnings: + animationImportErrors: + animationImportWarnings: + animationRetargetingWarnings: + animationDoRetargetingWarnings: 0 + importAnimatedCustomProperties: 0 + importConstraints: 0 + animationCompression: 1 + animationRotationError: 0.5 + animationPositionError: 0.5 + animationScaleError: 0.5 + animationWrapMode: 0 + extraExposedTransformPaths: [] + extraUserProperties: [] + clipAnimations: [] + isReadable: 0 + meshes: + lODScreenPercentages: [] + globalScale: 1 + meshCompression: 0 + addColliders: 0 + useSRGBMaterialColor: 1 + sortHierarchyByName: 1 + importVisibility: 1 + importBlendShapes: 1 + importCameras: 1 + importLights: 1 + nodeNameCollisionStrategy: 1 + fileIdsGeneration: 2 + swapUVChannels: 0 + generateSecondaryUV: 0 + useFileUnits: 1 + keepQuads: 0 + weldVertices: 1 + bakeAxisConversion: 0 + preserveHierarchy: 0 + skinWeightsMode: 0 + maxBonesPerVertex: 4 + minBoneWeight: 0.001 + optimizeBones: 1 + meshOptimizationFlags: -1 + indexFormat: 0 + secondaryUVAngleDistortion: 8 + secondaryUVAreaDistortion: 15.000001 + secondaryUVHardAngle: 88 + secondaryUVMarginMethod: 1 + secondaryUVMinLightmapResolution: 40 + secondaryUVMinObjectScale: 1 + secondaryUVPackMargin: 4 + useFileScale: 1 + strictVertexDataChecks: 0 + tangentSpace: + normalSmoothAngle: 60 + normalImportMode: 0 + tangentImportMode: 3 + normalCalculationMode: 4 + legacyComputeAllNormalsFromSmoothingGroupsWhenMeshHasBlendShapes: 0 + blendShapeNormalImportMode: 1 + normalSmoothingSource: 0 + referencedClips: [] + importAnimation: 1 + humanDescription: + serializedVersion: 3 + human: [] + skeleton: [] + armTwist: 0.5 + foreArmTwist: 0.5 + upperLegTwist: 0.5 + legTwist: 0.5 + armStretch: 0.05 + legStretch: 0.05 + feetSpacing: 0 + globalScale: 1 + rootMotionBoneName: + hasTranslationDoF: 0 + hasExtraRoot: 0 + skeletonHasParents: 1 + lastHumanDescriptionAvatarSource: {instanceID: 0} + autoGenerateAvatarMappingIfUnspecified: 1 + animationType: 2 + humanoidOversampling: 1 + avatarSetup: 0 + addHumanoidExtraRootOnlyWhenUsingAvatar: 1 + remapMaterialsIfMaterialImportModeIsNone: 0 + additionalBone: 0 + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Prefabs/YHJ/新建材质.mat b/xiaofang/Assets/Prefabs/YHJ/新建材质.mat new file mode 100644 index 00000000..6b1477f9 --- /dev/null +++ b/xiaofang/Assets/Prefabs/YHJ/新建材质.mat @@ -0,0 +1,80 @@ +%YAML 1.1 +%TAG !u! tag:unity3d.com,2011: +--- !u!21 &2100000 +Material: + serializedVersion: 8 + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_Name: "\u65B0\u5EFA\u6750\u8D28" + m_Shader: {fileID: 46, guid: 0000000000000000f000000000000000, type: 0} + m_ValidKeywords: [] + m_InvalidKeywords: [] + m_LightmapFlags: 4 + m_EnableInstancingVariants: 0 + m_DoubleSidedGI: 0 + m_CustomRenderQueue: -1 + stringTagMap: {} + disabledShaderPasses: [] + m_SavedProperties: + serializedVersion: 3 + m_TexEnvs: + - _BumpMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailAlbedoMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailMask: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _DetailNormalMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _EmissionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MainTex: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _MetallicGlossMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _OcclusionMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + - _ParallaxMap: + m_Texture: {fileID: 0} + m_Scale: {x: 1, y: 1} + m_Offset: {x: 0, y: 0} + m_Ints: [] + m_Floats: + - _BumpScale: 1 + - _Cutoff: 0.5 + - _DetailNormalMapScale: 1 + - _DstBlend: 0 + - _GlossMapScale: 1 + - _Glossiness: 0.5 + - _GlossyReflections: 1 + - _Metallic: 0 + - _Mode: 0 + - _OcclusionStrength: 1 + - _Parallax: 0.02 + - _SmoothnessTextureChannel: 0 + - _SpecularHighlights: 1 + - _SrcBlend: 1 + - _UVSec: 0 + - _ZWrite: 1 + m_Colors: + - _Color: {r: 1, g: 0, b: 0, a: 1} + - _EmissionColor: {r: 0, g: 0, b: 0, a: 1} + m_BuildTextureStacks: [] diff --git a/xiaofang/Assets/Prefabs/YHJ/新建材质.mat.meta b/xiaofang/Assets/Prefabs/YHJ/新建材质.mat.meta new file mode 100644 index 00000000..d6c5e533 --- /dev/null +++ b/xiaofang/Assets/Prefabs/YHJ/新建材质.mat.meta @@ -0,0 +1,8 @@ +fileFormatVersion: 2 +guid: fc2433cf1854ce540bed03bfea6c3e55 +NativeFormatImporter: + externalObjects: {} + mainObjectFileID: 2100000 + userData: + assetBundleName: + assetBundleVariant: diff --git a/xiaofang/Assets/Scenes/Tmap 1.unity b/xiaofang/Assets/Scenes/Tmap 1.unity index 74558f58..cab1cc8f 100644 --- a/xiaofang/Assets/Scenes/Tmap 1.unity +++ b/xiaofang/Assets/Scenes/Tmap 1.unity @@ -3634,7 +3634,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: b4bc8a6718ad365439657b4dace25c94, type: 3} propertyPath: m_IsActive - value: 0 + value: 1 objectReference: {fileID: 0} - target: {fileID: 5866666021909216657, guid: b4bc8a6718ad365439657b4dace25c94, type: 3} propertyPath: m_Controller @@ -3651,6 +3651,11 @@ Transform: m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: b4bc8a6718ad365439657b4dace25c94, type: 3} m_PrefabInstance: {fileID: 272025129} m_PrefabAsset: {fileID: 0} +--- !u!95 &272025132 stripped +Animator: + m_CorrespondingSourceObject: {fileID: 5866666021909216657, guid: b4bc8a6718ad365439657b4dace25c94, type: 3} + m_PrefabInstance: {fileID: 272025129} + m_PrefabAsset: {fileID: 0} --- !u!1001 &285549842 PrefabInstance: m_ObjectHideFlags: 0 @@ -4655,7 +4660,7 @@ MonoBehaviour: m_Script: {fileID: 11500000, guid: ea9eb82687dfa674e883273cd7c73386, type: 3} m_Name: m_EditorClassIdentifier: - ain: {fileID: 946635802} + ain: {fileID: 272025132} characterState: 0 PlayerCollider: {fileID: 382802810} --- !u!114 &382802815 @@ -9621,7 +9626,7 @@ PrefabInstance: objectReference: {fileID: 0} - target: {fileID: 919132149155446097, guid: cb3fa301a56f31a4d8301eccece5521b, type: 3} propertyPath: m_IsActive - value: 1 + value: 0 objectReference: {fileID: 0} - target: {fileID: 5866666021909216657, guid: cb3fa301a56f31a4d8301eccece5521b, type: 3} propertyPath: m_Controller @@ -9785,6 +9790,17 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 410985242629440748, guid: 9263a339010a182478c1a809e3f8ddf1, type: 3} m_PrefabInstance: {fileID: 947202399} m_PrefabAsset: {fileID: 0} +--- !u!114 &947202401 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 410985242629440749, guid: 9263a339010a182478c1a809e3f8ddf1, type: 3} + m_PrefabInstance: {fileID: 947202399} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &954859396 PrefabInstance: m_ObjectHideFlags: 0 @@ -10303,6 +10319,11 @@ Transform: m_CorrespondingSourceObject: {fileID: 418184, guid: 9d464f1837e43ac48976d9b299de45ed, type: 3} m_PrefabInstance: {fileID: 1017151807} m_PrefabAsset: {fileID: 0} +--- !u!4 &1036449735 stripped +Transform: + m_CorrespondingSourceObject: {fileID: 6888806815857526915, guid: b4bc8a6718ad365439657b4dace25c94, type: 3} + m_PrefabInstance: {fileID: 272025129} + m_PrefabAsset: {fileID: 0} --- !u!1 &1039624181 GameObject: m_ObjectHideFlags: 0 @@ -10562,6 +10583,17 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 410985242629440748, guid: 9263a339010a182478c1a809e3f8ddf1, type: 3} m_PrefabInstance: {fileID: 1039752000} m_PrefabAsset: {fileID: 0} +--- !u!114 &1039752002 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 410985242629440749, guid: 9263a339010a182478c1a809e3f8ddf1, type: 3} + m_PrefabInstance: {fileID: 1039752000} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1001 &1042755362 PrefabInstance: m_ObjectHideFlags: 0 @@ -18445,6 +18477,17 @@ RectTransform: m_CorrespondingSourceObject: {fileID: 410985242629440748, guid: 9263a339010a182478c1a809e3f8ddf1, type: 3} m_PrefabInstance: {fileID: 1301153373} m_PrefabAsset: {fileID: 0} +--- !u!114 &1301153375 stripped +MonoBehaviour: + m_CorrespondingSourceObject: {fileID: 410985242629440749, guid: 9263a339010a182478c1a809e3f8ddf1, type: 3} + m_PrefabInstance: {fileID: 1301153373} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 0} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3} + m_Name: + m_EditorClassIdentifier: --- !u!1 &1304359082 GameObject: m_ObjectHideFlags: 0 @@ -19270,6 +19313,7 @@ GameObject: serializedVersion: 6 m_Component: - component: {fileID: 1402647586} + - component: {fileID: 1402647587} m_Layer: 5 m_Name: xfs m_TagString: Untagged @@ -19301,6 +19345,23 @@ RectTransform: m_AnchoredPosition: {x: 0, y: 0} m_SizeDelta: {x: 100, y: 100} m_Pivot: {x: 0.5, y: 0.5} +--- !u!114 &1402647587 +MonoBehaviour: + m_ObjectHideFlags: 0 + m_CorrespondingSourceObject: {fileID: 0} + m_PrefabInstance: {fileID: 0} + m_PrefabAsset: {fileID: 0} + m_GameObject: {fileID: 1402647585} + m_Enabled: 1 + m_EditorHideFlags: 0 + m_Script: {fileID: 11500000, guid: 6d461a5fb54d89b4f8e206a82b5c033c, type: 3} + m_Name: + m_EditorClassIdentifier: + ConnectGun: {fileID: 947202401} + ConnectFa: {fileID: 1301153375} + OpenFa: {fileID: 1039752002} + Gun: {fileID: 919132149155446097, guid: ffc8f56811d7ca145812ba1f6a4be23a, type: 3} + Hand: {fileID: 1036449735} --- !u!1001 &1402705621 PrefabInstance: m_ObjectHideFlags: 0 diff --git a/xiaofang/Assets/Script/XFS.cs b/xiaofang/Assets/Script/XFS.cs new file mode 100644 index 00000000..e189c8c8 --- /dev/null +++ b/xiaofang/Assets/Script/XFS.cs @@ -0,0 +1,44 @@ +using System.Collections; +using System.Collections.Generic; +using UnityEngine; +using UnityEngine.UI; + +public class XFS : MonoBehaviour +{ + // Start is called before the first frame update + public Button ConnectGun; + public Button ConnectFa; + public Button OpenFa; + public GameObject Gun; + public Transform Hand; + void Start() + { + ConnectGun.onClick.AddListener(connectGun); + ConnectFa.onClick.AddListener(connectFa); + OpenFa.onClick.AddListener(openFa); + } + + void connectGun() + { + GameObject ob = Instantiate(Gun); + ob.transform.SetParent(Hand); + ob.transform.localRotation = new Quaternion(0, 180, 0, 0); + ob.transform.localPosition = new Vector3(0.000419999997f, 0.00138999999f, 0.000569999975f); + ob.transform.localScale = new Vector3(0.01f, 0.01f, 0.01f); + } + + void connectFa() + { + + } + + void openFa() + { + + } + // Update is called once per frame + void Update() + { + + } +} diff --git a/xiaofang/Assets/Script/XFS.cs.meta b/xiaofang/Assets/Script/XFS.cs.meta new file mode 100644 index 00000000..90a1c26b --- /dev/null +++ b/xiaofang/Assets/Script/XFS.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6d461a5fb54d89b4f8e206a82b5c033c +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: