synced up npc communication, still need to fix spy to spy communication

This commit is contained in:
Steven 2017-10-05 03:13:27 -05:00
parent bb61bbc72d
commit 1f4855712a
75 changed files with 735 additions and 5793 deletions

View file

@ -356,9 +356,10 @@ GameObject:
- component: {fileID: 114063469203119278}
- component: {fileID: 136748321063637496}
- component: {fileID: 114503176627609734}
- component: {fileID: 114776369420944768}
m_Layer: 10
m_Name: NPC
m_TagString: Untagged
m_TagString: NPC
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -2119,9 +2120,10 @@ MonoBehaviour:
onSerializeRigidBodyOption: 2
ownershipTransfer: 0
ObservedComponents:
- {fileID: 114492707522239788}
- {fileID: 114063469203119278}
ObservedComponentsFoldoutOpen: 0
- {fileID: 114776369420944768}
- {fileID: 114492707522239788}
ObservedComponentsFoldoutOpen: 1
viewIdField: 0
instantiationId: -1
currentMasterID: -1
@ -2148,15 +2150,14 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: eaa73f69e18e25947894aebb6dc9932f, type: 3}
m_Name:
m_EditorClassIdentifier:
interactions:
- {fileID: 11400000, guid: 218e2ddac8223e349a855bdae23819ab, type: 2}
spyInteractions: []
currentState: {fileID: 11400000, guid: 78ec31c429ad5074bb50d001b1a49a77, type: 2}
remainState: {fileID: 11400000, guid: 5eb84557ff3e09f42b843e0b09653774, type: 2}
idleState: {fileID: 0}
INTERACT_RANGE: 2
navMeshAgent: {fileID: 0}
animator: {fileID: 0}
characterAnimator: {fileID: 0}
interactionText:
wayPointPrefab: {fileID: 0}
--- !u!114 &114503176627609734
MonoBehaviour:
m_ObjectHideFlags: 1
@ -2170,6 +2171,71 @@ MonoBehaviour:
m_EditorClassIdentifier:
GlowColor: {r: 0, g: 1, b: 0.006896496, a: 0}
LerpFactor: 10
--- !u!114 &114776369420944768
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1249949894527080}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 627855c7f81362d41938ffe0b1475957, type: 3}
m_Name:
m_EditorClassIdentifier:
m_PositionModel:
SynchronizeEnabled: 0
TeleportEnabled: 1
TeleportIfDistanceGreaterThan: 3
InterpolateOption: 2
InterpolateMoveTowardsSpeed: 1
InterpolateLerpSpeed: 1
InterpolateMoveTowardsAcceleration: 2
InterpolateMoveTowardsDeceleration: 2
InterpolateSpeedCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: -1
value: 0
inSlope: 0
outSlope: Infinity
tangentMode: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 1
tangentMode: 0
- serializedVersion: 2
time: 4
value: 4
inSlope: 1
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
ExtrapolateOption: 0
ExtrapolateSpeed: 1
ExtrapolateIncludingRoundTripTime: 1
ExtrapolateNumberOfStoredPositions: 1
DrawErrorGizmo: 1
m_RotationModel:
SynchronizeEnabled: 1
InterpolateOption: 1
InterpolateRotateTowardsSpeed: 180
InterpolateLerpSpeed: 5
m_ScaleModel:
SynchronizeEnabled: 0
InterpolateOption: 0
InterpolateMoveTowardsSpeed: 1
InterpolateLerpSpeed: 0
--- !u!136 &136748321063637496
CapsuleCollider:
m_ObjectHideFlags: 1
@ -2383,7 +2449,7 @@ NavMeshAgent:
m_GameObject: {fileID: 1249949894527080}
m_Enabled: 1
m_AgentTypeID: 0
m_Radius: 0.1
m_Radius: 0.2
m_Speed: 1.7
m_Acceleration: 8
avoidancePriority: 50
@ -2395,4 +2461,4 @@ NavMeshAgent:
m_Height: 2
m_BaseOffset: -0.1
m_WalkableMask: 4294967295
m_ObstacleAvoidanceType: 4
m_ObstacleAvoidanceType: 0

View file

@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: bd0758bd5b05bc04eaeee295e5917b09
folderAsset: yes
timeCreated: 1506987601
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,498 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1057615597006810}
m_IsPrefabParent: 1
--- !u!1 &1057615597006810
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4550573785341638}
- component: {fileID: 114359923699139636}
- component: {fileID: 114024861962930332}
- component: {fileID: 195319200952995954}
m_Layer: 0
m_Name: OldNPC
m_TagString: NPC
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1126820300319554
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4217374063523058}
- component: {fileID: 33735188809925466}
- component: {fileID: 65860989226947862}
- component: {fileID: 23941815072123448}
m_Layer: 8
m_Name: Body
m_TagString: NPC
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1381665766028140
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4096024655937812}
- component: {fileID: 111890134124086190}
m_Layer: 0
m_Name: LeftShoulder
m_TagString: NPC
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1444155670206188
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4200115977521848}
- component: {fileID: 33845168317084218}
- component: {fileID: 23262448647501294}
m_Layer: 0
m_Name: RightArm
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1531674994177130
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4337374595919606}
m_Layer: 0
m_Name: RightShoulder
m_TagString: NPC
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1777684086661350
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4351823664398018}
- component: {fileID: 33877953466603606}
- component: {fileID: 23611067882153422}
m_Layer: 0
m_Name: Nose
m_TagString: NPC
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1812520457084846
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4819433964098212}
- component: {fileID: 33257890776926430}
- component: {fileID: 23725026200600758}
m_Layer: 0
m_Name: LeftArm
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1888886586997398
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4404938505999528}
m_Layer: 0
m_Name: CameraTarget
m_TagString: NPC
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4096024655937812
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1381665766028140}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.3, y: -0.3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4819433964098212}
m_Father: {fileID: 4550573785341638}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4200115977521848
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1444155670206188}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.19999999, z: 0}
m_LocalScale: {x: 0.099999994, y: 0.5, z: 0.099999994}
m_Children: []
m_Father: {fileID: 4337374595919606}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4217374063523058
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1126820300319554}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.5, z: 0}
m_LocalScale: {x: 0.5, y: 1, z: 0.5}
m_Children: []
m_Father: {fileID: 4550573785341638}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4337374595919606
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1531674994177130}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.3, y: -0.3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4200115977521848}
m_Father: {fileID: 4550573785341638}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4351823664398018
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1777684086661350}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.26999998, z: 0.25}
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
m_Children: []
m_Father: {fileID: 4550573785341638}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4404938505999528
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1888886586997398}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4550573785341638}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4550573785341638
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1057615597006810}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4096024655937812}
- {fileID: 4337374595919606}
- {fileID: 4404938505999528}
- {fileID: 4351823664398018}
- {fileID: 4217374063523058}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4819433964098212
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1812520457084846}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.19999999, z: 0}
m_LocalScale: {x: 0.099999994, y: 0.5, z: 0.099999994}
m_Children: []
m_Father: {fileID: 4096024655937812}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &23262448647501294
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1444155670206188}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!23 &23611067882153422
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1777684086661350}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!23 &23725026200600758
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1812520457084846}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!23 &23941815072123448
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1126820300319554}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: f36b9789b902b3f4fb77a1a9bb7d8cba, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &33257890776926430
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1812520457084846}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &33735188809925466
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1126820300319554}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &33845168317084218
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1444155670206188}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &33877953466603606
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1777684086661350}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &65860989226947862
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1126820300319554}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!111 &111890134124086190
Animation:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1381665766028140}
m_Enabled: 1
serializedVersion: 3
m_Animation: {fileID: 7400000, guid: 0d1b4be09a8f56b49ae0c9839f5e5570, type: 2}
m_Animations:
- {fileID: 7400000, guid: 0d1b4be09a8f56b49ae0c9839f5e5570, type: 2}
m_WrapMode: 0
m_PlayAutomatically: 0
m_AnimatePhysics: 0
m_CullingType: 0
--- !u!114 &114024861962930332
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1057615597006810}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 08ac21f34fab492479c8ba517d134d33, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &114359923699139636
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1057615597006810}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: aa584fbee541324448dd18d8409c7a41, type: 3}
m_Name:
m_EditorClassIdentifier:
ownerId: 0
group: 0
OwnerShipWasTransfered: 0
prefixBackup: -1
synchronization: 0
onSerializeTransformOption: 3
onSerializeRigidBodyOption: 2
ownershipTransfer: 0
ObservedComponents:
- {fileID: 0}
ObservedComponentsFoldoutOpen: 1
viewIdField: 0
instantiationId: -1
currentMasterID: -1
isRuntimeInstantiated: 0
--- !u!195 &195319200952995954
NavMeshAgent:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1057615597006810}
m_Enabled: 1
m_AgentTypeID: 0
m_Radius: 0.1
m_Speed: 1
m_Acceleration: 1000
avoidancePriority: 50
m_AngularSpeed: 1000
m_StoppingDistance: 0.1
m_AutoTraverseOffMeshLink: 1
m_AutoBraking: 1
m_AutoRepath: 1
m_Height: 1
m_BaseOffset: 1
m_WalkableMask: 4294967295
m_ObstacleAvoidanceType: 4

View file

@ -1,680 +0,0 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1001 &100100000
Prefab:
m_ObjectHideFlags: 1
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications: []
m_RemovedComponents: []
m_ParentPrefab: {fileID: 0}
m_RootGameObject: {fileID: 1802754264274306}
m_IsPrefabParent: 1
--- !u!1 &1032208385951094
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4779048883842138}
- component: {fileID: 111145754345681274}
m_Layer: 0
m_Name: LeftShoulder
m_TagString: Spy
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1257584423858482
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4430354943358540}
- component: {fileID: 33669237329726310}
- component: {fileID: 65457508975598666}
- component: {fileID: 23330507826903970}
m_Layer: 8
m_Name: Body
m_TagString: Spy
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1286496733549970
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4793872894975840}
m_Layer: 0
m_Name: CameraTarget
m_TagString: Spy
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1346753426744742
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4746764511021966}
m_Layer: 0
m_Name: RightShoulder
m_TagString: Spy
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1620001557903490
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4045646946691380}
- component: {fileID: 33829691036055006}
- component: {fileID: 23652756610397682}
m_Layer: 0
m_Name: RightArm
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1688595544132444
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4678702805608212}
- component: {fileID: 33557797566304358}
- component: {fileID: 23114392502969186}
m_Layer: 0
m_Name: Nose
m_TagString: Spy
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1732268044639884
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224646681756712024}
- component: {fileID: 223669680760996550}
- component: {fileID: 114343748296349344}
- component: {fileID: 114874158646270740}
m_Layer: 5
m_Name: Canvas
m_TagString: Spy
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!1 &1792329136282156
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 224202104643401038}
- component: {fileID: 222239225668429162}
- component: {fileID: 114847445332502238}
m_Layer: 5
m_Name: Image
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1793856925762854
GameObject:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4237908354403846}
- component: {fileID: 33987673697585266}
- component: {fileID: 23166375077367682}
m_Layer: 0
m_Name: LeftArm
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!1 &1802754264274306
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
serializedVersion: 5
m_Component:
- component: {fileID: 4378487762680274}
- component: {fileID: 114281114656434320}
- component: {fileID: 114717847564585420}
- component: {fileID: 195162594393817470}
- component: {fileID: 114178078561552090}
m_Layer: 0
m_Name: OldSpy
m_TagString: Spy
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4045646946691380
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1620001557903490}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.19999999, z: 0}
m_LocalScale: {x: 0.099999994, y: 0.5, z: 0.099999994}
m_Children: []
m_Father: {fileID: 4746764511021966}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4237908354403846
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1793856925762854}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.19999999, z: 0}
m_LocalScale: {x: 0.099999994, y: 0.5, z: 0.099999994}
m_Children: []
m_Father: {fileID: 4779048883842138}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4378487762680274
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1802754264274306}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 1, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4779048883842138}
- {fileID: 4746764511021966}
- {fileID: 4793872894975840}
- {fileID: 4678702805608212}
- {fileID: 4430354943358540}
- {fileID: 224646681756712024}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4430354943358540
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1257584423858482}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.5, z: 0}
m_LocalScale: {x: 0.5, y: 1, z: 0.5}
m_Children: []
m_Father: {fileID: 4378487762680274}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4678702805608212
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1688595544132444}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: -0.26999998, z: 0.25}
m_LocalScale: {x: 0.1, y: 0.1, z: 0.1}
m_Children: []
m_Father: {fileID: 4378487762680274}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4746764511021966
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1346753426744742}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0.3, y: -0.3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4045646946691380}
m_Father: {fileID: 4378487762680274}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4779048883842138
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1032208385951094}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -0.3, y: -0.3, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4237908354403846}
m_Father: {fileID: 4378487762680274}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &4793872894975840
Transform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1286496733549970}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.5, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 4378487762680274}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &23114392502969186
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1688595544132444}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!23 &23166375077367682
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1793856925762854}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!23 &23330507826903970
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1257584423858482}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: f36b9789b902b3f4fb77a1a9bb7d8cba, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!23 &23652756610397682
MeshRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1620001557903490}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, guid: 0000000000000000f000000000000000, type: 0}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
--- !u!33 &33557797566304358
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1688595544132444}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &33669237329726310
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1257584423858482}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &33829691036055006
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1620001557903490}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!33 &33987673697585266
MeshFilter:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1793856925762854}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!65 &65457508975598666
BoxCollider:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1257584423858482}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!111 &111145754345681274
Animation:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1032208385951094}
m_Enabled: 1
serializedVersion: 3
m_Animation: {fileID: 7400000, guid: 0d1b4be09a8f56b49ae0c9839f5e5570, type: 2}
m_Animations:
- {fileID: 7400000, guid: 0d1b4be09a8f56b49ae0c9839f5e5570, type: 2}
m_WrapMode: 0
m_PlayAutomatically: 0
m_AnimatePhysics: 0
m_CullingType: 0
--- !u!114 &114178078561552090
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1802754264274306}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 6424f0a0a27cd694d9871b7cf3137e8d, type: 3}
m_Name:
m_EditorClassIdentifier:
shakeAnimation: {fileID: 111145754345681274}
isShaking: 0
nameTag: {fileID: 1732268044639884}
--- !u!114 &114281114656434320
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1802754264274306}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: aa584fbee541324448dd18d8409c7a41, type: 3}
m_Name:
m_EditorClassIdentifier:
ownerId: 0
group: 0
OwnerShipWasTransfered: 0
prefixBackup: -1
synchronization: 0
onSerializeTransformOption: 3
onSerializeRigidBodyOption: 2
ownershipTransfer: 0
ObservedComponents:
- {fileID: 0}
ObservedComponentsFoldoutOpen: 1
viewIdField: 0
instantiationId: -1
currentMasterID: -1
isRuntimeInstantiated: 0
--- !u!114 &114343748296349344
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1732268044639884}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1980459831, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_UiScaleMode: 0
m_ReferencePixelsPerUnit: 100
m_ScaleFactor: 1
m_ReferenceResolution: {x: 800, y: 600}
m_ScreenMatchMode: 0
m_MatchWidthOrHeight: 0
m_PhysicalUnit: 3
m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 10
--- !u!114 &114717847564585420
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1802754264274306}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3c9e5b8e36b3b0747811ece9fa00437a, type: 3}
m_Name:
m_EditorClassIdentifier:
particle: {fileID: 1985718805234408, guid: c88d3f518f298774f86ed97b96c1bdc5, type: 2}
cameraRigPrefab: {fileID: 1009033979625728, guid: 1764211b5690c164d82aa46fa4ec707d,
type: 2}
cameraTarget: {fileID: 4793872894975840}
--- !u!114 &114847445332502238
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1792329136282156}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 2100000, guid: a3c9ba309d7999b489463b2ebe102c8b, type: 2}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_Sprite: {fileID: 21300000, guid: 4947646404ca2a24b822946403e33658, type: 3}
m_Type: 0
m_PreserveAspect: 1
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
--- !u!114 &114874158646270740
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1732268044639884}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 1301386320, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_IgnoreReversedGraphics: 1
m_BlockingObjects: 0
m_BlockingMask:
serializedVersion: 2
m_Bits: 4294967295
--- !u!195 &195162594393817470
NavMeshAgent:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1802754264274306}
m_Enabled: 1
m_AgentTypeID: 0
m_Radius: 0.1
m_Speed: 1
m_Acceleration: 1000
avoidancePriority: 50
m_AngularSpeed: 1000
m_StoppingDistance: 0.1
m_AutoTraverseOffMeshLink: 1
m_AutoBraking: 1
m_AutoRepath: 1
m_Height: 1
m_BaseOffset: 1
m_WalkableMask: 4294967295
m_ObstacleAvoidanceType: 4
--- !u!222 &222239225668429162
CanvasRenderer:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1792329136282156}
--- !u!223 &223669680760996550
Canvas:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1732268044639884}
m_Enabled: 1
serializedVersion: 3
m_RenderMode: 2
m_Camera: {fileID: 0}
m_PlaneDistance: 100
m_PixelPerfect: 0
m_ReceivesEvents: 1
m_OverrideSorting: 0
m_OverridePixelPerfect: 0
m_SortingBucketNormalizedSize: 0
m_AdditionalShaderChannelsFlag: 0
m_SortingLayerID: 0
m_SortingOrder: 0
m_TargetDisplay: 0
--- !u!224 &224202104643401038
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1792329136282156}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 224646681756712024}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: -0.2}
m_SizeDelta: {x: 50, y: 20}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!224 &224646681756712024
RectTransform:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1732268044639884}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 0.02, y: 0.02, z: 1}
m_Children:
- {fileID: 224202104643401038}
m_Father: {fileID: 4378487762680274}
m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 0, y: 0}
m_AnchoredPosition: {x: 0, y: 0.3}
m_SizeDelta: {x: 1, y: 1}
m_Pivot: {x: 0.5, y: 0.5}

View file

@ -63,4 +63,6 @@ MonoBehaviour:
- SetDestinationRPC
- SetBoolRPC
- SetTriggerRPC
- SetInteractorRPC
- SetIsInteractingRPC
DisableAutoOpenWizard: 1

View file

@ -803,13 +803,14 @@ GameObject:
- component: {fileID: 4578550263615494}
- component: {fileID: 95997538810399862}
- component: {fileID: 114077578116518258}
- component: {fileID: 114542938676306540}
- component: {fileID: 195308308529917620}
- component: {fileID: 114148290003448986}
- component: {fileID: 136669760707136746}
- component: {fileID: 114764386739800882}
- component: {fileID: 114618342993419754}
m_Layer: 10
m_Name: Spy
m_TagString: Untagged
m_TagString: Spy
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -1637,7 +1638,7 @@ Transform:
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1736268233368836}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.90298784, y: 0, z: -0.08948016}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4675720493136984}
@ -2129,14 +2130,15 @@ MonoBehaviour:
onSerializeRigidBodyOption: 2
ownershipTransfer: 0
ObservedComponents:
- {fileID: 114542938676306540}
- {fileID: 114077578116518258}
- {fileID: 114764386739800882}
- {fileID: 114618342993419754}
ObservedComponentsFoldoutOpen: 1
viewIdField: 0
instantiationId: -1
currentMasterID: -1
isRuntimeInstantiated: 0
--- !u!114 &114542938676306540
--- !u!114 &114618342993419754
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
@ -2147,16 +2149,78 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: eaa73f69e18e25947894aebb6dc9932f, type: 3}
m_Name:
m_EditorClassIdentifier:
interactions: []
spyInteractions: []
currentState: {fileID: 11400000, guid: 1c694dfd46dd4e44b94f7853724fa1c0, type: 2}
remainState: {fileID: 11400000, guid: 5eb84557ff3e09f42b843e0b09653774, type: 2}
idleState: {fileID: 11400000, guid: 1c694dfd46dd4e44b94f7853724fa1c0, type: 2}
INTERACT_RANGE: 2
navMeshAgent: {fileID: 0}
animator: {fileID: 0}
characterAnimator: {fileID: 0}
interactionText:
wayPointPrefab: {fileID: 1985718805234408, guid: c88d3f518f298774f86ed97b96c1bdc5,
type: 2}
--- !u!114 &114764386739800882
MonoBehaviour:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 100100000}
m_GameObject: {fileID: 1736268233368836}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 627855c7f81362d41938ffe0b1475957, type: 3}
m_Name:
m_EditorClassIdentifier:
m_PositionModel:
SynchronizeEnabled: 0
TeleportEnabled: 1
TeleportIfDistanceGreaterThan: 3
InterpolateOption: 2
InterpolateMoveTowardsSpeed: 1
InterpolateLerpSpeed: 1
InterpolateMoveTowardsAcceleration: 2
InterpolateMoveTowardsDeceleration: 2
InterpolateSpeedCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 2
time: -1
value: 0
inSlope: 0
outSlope: Infinity
tangentMode: 0
- serializedVersion: 2
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
- serializedVersion: 2
time: 1
value: 1
inSlope: 0
outSlope: 1
tangentMode: 0
- serializedVersion: 2
time: 4
value: 4
inSlope: 1
outSlope: 0
tangentMode: 0
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
ExtrapolateOption: 0
ExtrapolateSpeed: 1
ExtrapolateIncludingRoundTripTime: 1
ExtrapolateNumberOfStoredPositions: 1
DrawErrorGizmo: 1
m_RotationModel:
SynchronizeEnabled: 1
InterpolateOption: 1
InterpolateRotateTowardsSpeed: 180
InterpolateLerpSpeed: 5
m_ScaleModel:
SynchronizeEnabled: 0
InterpolateOption: 0
InterpolateMoveTowardsSpeed: 1
InterpolateLerpSpeed: 0
--- !u!136 &136669760707136746
CapsuleCollider:
m_ObjectHideFlags: 1
@ -2370,7 +2434,7 @@ NavMeshAgent:
m_GameObject: {fileID: 1736268233368836}
m_Enabled: 1
m_AgentTypeID: 0
m_Radius: 0.1
m_Radius: 0.2
m_Speed: 1.7
m_Acceleration: 8
avoidancePriority: 50
@ -2382,4 +2446,4 @@ NavMeshAgent:
m_Height: 2
m_BaseOffset: -0.1
m_WalkableMask: 4294967295
m_ObstacleAvoidanceType: 4
m_ObstacleAvoidanceType: 0

View file

@ -607,9 +607,10 @@ MonoBehaviour:
m_EditorClassIdentifier:
guardCamera: {fileID: 1654923637}
spyPrefab: {fileID: 1736268233368836, guid: 8de347aada1dce74ca095e2694bfa639, type: 2}
NCPPrefab: {fileID: 1249949894527080, guid: ea4aade53c5c4714b8b9c335e8100cf0, type: 2}
NPCPrefab: {fileID: 1249949894527080, guid: ea4aade53c5c4714b8b9c335e8100cf0, type: 2}
cameraRigPrefab: {fileID: 1009033979625728, guid: 1764211b5690c164d82aa46fa4ec707d,
type: 2}
numNpcs: 5
spyMissionsComplete: 0
waitBetweenMissions: 5
onMissionCooldown: 0

View file

@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 320b8ace903cab542b05f6b990f62ebe
folderAsset: yes
timeCreated: 1506027014
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

File diff suppressed because it is too large Load diff

View file

@ -1,8 +0,0 @@
fileFormatVersion: 2
guid: b679f50ae448b0642b9887e440a00e0f
timeCreated: 1505318911
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View file

@ -6,25 +6,38 @@ using UnityEngine.AI;
[CreateAssetMenu(menuName = "CharacterStateMachine/Actions/IdleClick")]
public class IdleClickAction : Action
{
public GameObject wayPointPrefab;
public override void StartAct(StateController controller)
{
ProgressPanelController.ActivePanel.Hide();
controller.SelectedInteraction = null;
}
public override void Act(StateController controller)
{
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (Input.GetMouseButtonDown(0))
{
// Check first if the player clicked on a selectable object
SelectableObject selectableObject;
if (RaycastForSelectableObject(controller, ray, out selectableObject))
{
Debug.Log("Selected object set to " + selectableObject.name);
controller.SelectedObject = selectableObject;
controller.Destination = selectableObject.gameObject.transform.position;
return;
}
// At this point, the player didn't click on a selectable object,
// so the player is probably issuing a move command.
controller.SelectedObject = null;
Debug.Log("Moving Spy");
RaycastToMoveController(controller, ray);
}
}
// See if StateController clicked on a Selectable Object
// Check if StateController clicked on a Selectable Object
bool RaycastForSelectableObject(StateController controller, Ray ray, out SelectableObject selectableObject)
{
int layerMask = LayerMask.NameToLayer("SelectableObject");
@ -33,7 +46,7 @@ public class IdleClickAction : Action
if (Physics.Raycast(ray, out hit, 100.0f, mask))
{
SelectableObject selectable = hit.collider.gameObject.GetComponentInParent<SelectableObject>();
if (selectable != null && (StateController)selectable != controller)
if (selectable != null && (StateController)selectable != controller && selectable.HasInteractions())
{
selectableObject = selectable;
return true;
@ -43,7 +56,7 @@ public class IdleClickAction : Action
return false;
}
// See if StateController clicked on the floor to issue a move command
// Check if StateController clicked on the floor to issue a move command
bool RaycastToMoveController(StateController controller, Ray ray)
{
int layerMask = LayerMask.NameToLayer("Floor");
@ -55,7 +68,7 @@ public class IdleClickAction : Action
if (NavMesh.SamplePosition(hit.point, out navhit, 1.0f, NavMesh.AllAreas))
{
controller.Destination = navhit.position;
Instantiate(controller.wayPointPrefab, navhit.position, Quaternion.identity);
Instantiate(wayPointPrefab, navhit.position, Quaternion.identity);
return true;
}
}

View file

@ -10,21 +10,21 @@ public class PromptInteractionsAction : Action {
string objectInteractionText = "Press 'E' to interact with ";
if (ReceivedInteraction(controller))
{
InteractionPanelController.ActivePanel.Reveal(controller.Interactor.interactionText);
InteractionPanelController.Reveal(controller.Interactor.name);
}
else if (SelectedObjectAvailable(controller))
{
InteractionPanelController.ActivePanel.Reveal(objectInteractionText + controller.SelectedObject.GetInteractionTitle());
InteractionPanelController.Reveal(objectInteractionText + controller.SelectedObject.name);
}
else
{
InteractionPanelController.ActivePanel.Hide();
InteractionPanelController.Hide();
}
}
public override void EndAct(StateController controller)
{
InteractionPanelController.ActivePanel.Hide();
InteractionPanelController.Hide();
}
// Other controller is attempting to interact with this controller
@ -37,6 +37,8 @@ public class PromptInteractionsAction : Action {
{
if (controller.SelectedObject == null)
return false;
return (controller.SelectedObject.transform.position - controller.transform.position).magnitude < controller.INTERACT_RANGE;
if (controller.SelectedObject.Interactor != null)
return false;
return (controller.SelectedObject.transform.position - controller.transform.position).magnitude < StateController.INTERACT_RANGE;
}
}

View file

@ -5,34 +5,24 @@ using UnityEngine.AI;
[CreateAssetMenu(menuName = "CharacterStateMachine/Actions/Roam")]
public class RoamAction : Action
{
private float roomSize = 10.0f;
public override void StartAct(StateController controller)
{
controller.StartCoroutine(changeDestination(controller));
Debug.Log("Started Roaming");
controller.StartRoaming();
}
public override void Act(StateController controller)
{
if (controller.Interactor != null && !controller.IsInteracting)
{
Debug.Log("Accepting incomming interaction!");
controller.AcceptInteraction();
}
}
public override void EndAct(StateController controller)
{
controller.StopCoroutine(changeDestination(controller));
}
private IEnumerator changeDestination(StateController controller)
{
while(true)
{
yield return new WaitForSeconds(Random.value * 10.0f);
controller.Destination = GetRandomLocation();
}
}
private Vector3 GetRandomLocation()
{
var randTarget = new Vector3(roomSize - (roomSize * 2 * Random.value), 0.0f, roomSize - (roomSize * 2 * Random.value));
NavMeshHit hit;
if (NavMesh.SamplePosition(randTarget, out hit, 1.0f, NavMesh.AllAreas))
return hit.position;
else
return GetRandomLocation();
Debug.Log("Stopping coroutine");
controller.StopRoaming();
}
}

View file

@ -1,29 +1,26 @@
using UnityEngine;
using System;
[CreateAssetMenu(menuName = "CharacterStateMachine/Actions/Interact")]
public class InteractAction : Action
[CreateAssetMenu(menuName = "CharacterStateMachine/Actions/SpyInteract")]
public class SpyInteractAction : Action
{
public CharacterAnimator.Params trigger;
public override void StartAct(StateController controller)
{
controller.characterAnimator.SetTrigger(trigger);
ProgressPanelController.ActivePanel.Reveal("Passing Message...");
controller.FaceSelectedObject();
controller.characterAnimator.SetTrigger(controller.SelectedInteraction.characterInteraction);
}
public override void Act(StateController controller)
{
AnimatorStateInfo info = controller.animator.GetCurrentAnimatorStateInfo(0);
if (!info.IsName(CharacterAnimator.GetParamName(trigger)))
return;
float progress = info.normalizedTime;
ProgressPanelController.ActivePanel.Progress = progress;
}
public override void EndAct(StateController controller)
{
Debug.Log("Ending SpyInteract");
ProgressPanelController.ActivePanel.Hide();
controller.SelectedObject = null;
controller.FinishInteraction();
}
}

View file

@ -0,0 +1,19 @@
using UnityEngine;
[CreateAssetMenu(menuName = "CharacterStateMachine/Actions/WaitForInteractionAcceptance")]
public class WaitForInteractionAcceptance : Action
{
public override void StartAct(StateController controller)
{
// Todo: Remove this line once the "interaction selector" UI is finished
controller.SelectedInteraction = controller.SelectedObject.interactions[0];
controller.InitiateInteractionWithSelectedObject();
ProgressPanelController.ActivePanel.Reveal(controller.SelectedInteraction.interactionDescription);
}
public override void EndAct(StateController controller)
{
//Debug.Log("Finished waiting for acceptance");
}
}

View file

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 08ac21f34fab492479c8ba517d134d33
timeCreated: 1505314105
guid: 8c0e47cb2bca42f488a811d83f540d3f
timeCreated: 1507178504
licenseType: Free
MonoImporter:
serializedVersion: 2

View file

@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(menuName = "CharacterStateMachine/Actions/WaitInPlace")]
public class WaitInPlaceAction : Action {
public override void StartAct(StateController controller)
{
Debug.Log("Waiting in place!");
controller.FaceInteractor();
controller.Destination = controller.transform.position;
}
public override void EndAct(StateController controller)
{
Debug.Log("Done waiting in place!");
}
}

View file

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 3c9e5b8e36b3b0747811ece9fa00437a
timeCreated: 1505318681
guid: ceba2653fc9a3fc41b92315785f89440
timeCreated: 1507181762
licenseType: Free
MonoImporter:
serializedVersion: 2

View file

@ -41,6 +41,7 @@ public class CharacterAnimator : Photon.PunBehaviour
protected virtual void Update()
{
if (photonView.isMine)
animator.SetFloat(paramHashes[(int)Params.MoveSpeed], controller.navMeshAgent.velocity.magnitude);
}

View file

@ -0,0 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(menuName = "CharacterStateMachine/Decisions/InitiatedInteraction")]
public class InitiatedInteractionDecision : Decision
{
public override bool Decide(StateController controller)
{
return Input.GetKeyDown(KeyCode.E) &&
InteractionPanelController.InteractionPrompted() &&
controller.SelectedObject != null;/* &&
!controller.SelectedObject.IsInteracting &&
controller.SelectedObject.Interactor == null;*/
}
}

View file

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 6424f0a0a27cd694d9871b7cf3137e8d
timeCreated: 1505973449
guid: 8751dd1b36598eb4c9932df92c8b0774
timeCreated: 1506921942
licenseType: Free
MonoImporter:
serializedVersion: 2

View file

@ -0,0 +1,12 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[CreateAssetMenu(menuName = "CharacterStateMachine/Decisions/InteractionAccepted")]
public class InteractionAcceptedDecision : Decision
{
public override bool Decide(StateController controller)
{
return controller.IsInteractionAccepted();
}
}

View file

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 5277ef44f4e110947993697cba721d20
timeCreated: 1505750194
guid: 3f9fa98245568d74ca9c5ea641087346
timeCreated: 1507178504
licenseType: Free
MonoImporter:
serializedVersion: 2

View file

@ -7,6 +7,6 @@ public class IsInteractingDecision : Decision
{
public override bool Decide(StateController controller)
{
return Input.GetKeyDown(KeyCode.E);
return controller.IsInteracting;
}
}

View file

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 8751dd1b36598eb4c9932df92c8b0774
timeCreated: 1506921942
guid: 1408b2a1a74df8b4bb7d71896fd72b9d
timeCreated: 1507182452
licenseType: Free
MonoImporter:
serializedVersion: 2

View file

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 70212e22222967e458cb08a8eda58a15
guid: d513b8a744b4628459f2c33734361fca
folderAsset: yes
timeCreated: 1505311861
timeCreated: 1507179177
licenseType: Free
DefaultImporter:
userData:

View file

@ -0,0 +1,16 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3e84829fa9f855a42b9c35f7eb3b3dc0, type: 3}
m_Name: TellSecret
m_EditorClassIdentifier:
interactionDescription: Telling Secret...
characterInteraction: 1
result: 0

View file

@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: b1f9d2b2f3968434586b7c398ede29d4
timeCreated: 1506460790
guid: 218e2ddac8223e349a855bdae23819ab
timeCreated: 1507179270
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 23800000
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,6 +1,4 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine;
public abstract class Action : ScriptableObject
{

View file

@ -0,0 +1,15 @@
using UnityEngine;
[CreateAssetMenu(menuName = "CharacterStateMachine/Interaction")]
public class Interaction : ScriptableObject
{
// Animation performed by the character
public string interactionDescription;
public CharacterAnimator.Params characterInteraction;
public InteractionResult result;
public enum InteractionResult
{
Nothing, SpyMissionComplete
}
}

View file

@ -0,0 +1,12 @@
fileFormatVersion: 2
guid: 3e84829fa9f855a42b9c35f7eb3b3dc0
timeCreated: 1507174447
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -4,18 +4,99 @@ using UnityEngine;
public abstract class SelectableObject : Photon.PunBehaviour
{
// PhotonView Id of interacting character
[SerializeField]
private int _queuedInteractorId = -1;
[SerializeField]
private bool _isInteracting = false;
// Interactions NPC's or spies can perform on this object
public Interaction[] interactions;
// Interactions only spies can perform on this object
public Interaction[] spyInteractions;
public virtual void Selected()
{
}
public virtual void Deselected()
{
}
public virtual void Update()
{
if (Interactor != null)
{
AcceptInteraction();
}
}
public bool HasInteractions()
{
return (interactions.Length + spyInteractions.Length) > 0;
}
public virtual string GetInteractionTitle()
{
return "";
}
// Manages other StateControllers signalling this controller for an interaction
public StateController Interactor
{
get
{
if (_queuedInteractorId < 0)
return null;
PhotonView view = PhotonView.Find(_queuedInteractorId);
if (view)
return view.GetComponent<StateController>();
else
return null;
}
set
{
if (value == null)
{
photonView.RPC("SetInteractorRPC", PhotonTargets.All, -1);
IsInteracting = false;
return;
}
photonView.RPC("SetInteractorRPC", PhotonTargets.All, value.GetComponent<PhotonView>().viewID);
}
}
public void AcceptInteraction()
{
IsInteracting = true;
}
public void RejectInteraction()
{
Interactor.IsInteracting = false;
}
public bool IsInteracting {
get
{
return _isInteracting;
}
set
{
photonView.RPC("SetIsInteractingRPC", PhotonTargets.All, value);
}
}
[PunRPC]
protected void SetIsInteractingRPC(bool value)
{
_isInteracting = value;
}
[PunRPC]
protected void SetInteractorRPC(int viewId)
{
_queuedInteractorId = viewId;
}
}

View file

@ -43,16 +43,12 @@ public class State : ScriptableObject
{
for (int i = 0; i < transitions.Length; i++)
{
bool decisionSucceeded = transitions[i].decision.Decide(controller);
bool decisionSucceeded = transitions[i].decision.Decide(controller) == transitions[i].transitionValue;
if (decisionSucceeded)
{
controller.TransitionToState(transitions[i].trueState);
}
else
{
controller.TransitionToState(transitions[i].falseState);
}
}
}

View file

@ -7,5 +7,5 @@ public class Transition
{
public Decision decision;
public State trueState;
public State falseState;
public bool transitionValue = true;
}

View file

@ -11,3 +11,5 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: b2365eed7d103de4bbd34e2af101294b, type: 3}
m_Name: IdleClick
m_EditorClassIdentifier:
wayPointPrefab: {fileID: 1985718805234408, guid: c88d3f518f298774f86ed97b96c1bdc5,
type: 2}

View file

@ -12,3 +12,4 @@ MonoBehaviour:
m_Name: PassMessage
m_EditorClassIdentifier:
trigger: 1
interactionMessage: Passing Message...

View file

@ -0,0 +1,13 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f1f63af581c5a74c9e4121020dc1e19, type: 3}
m_Name: SpyInteract
m_EditorClassIdentifier:

View file

@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: 776584f30673ec24b9c1251ae4070352
timeCreated: 1505968599
guid: 8f046fde7baf01047b31646cc02aa8d2
timeCreated: 1507178586
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 100100000
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,13 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8c0e47cb2bca42f488a811d83f540d3f, type: 3}
m_Name: WaitForInteractionAcceptance
m_EditorClassIdentifier:

View file

@ -1,9 +1,9 @@
fileFormatVersion: 2
guid: b25e969032ebb1f4089308db11ee93b1
timeCreated: 1505316504
guid: 309e42450c40f714a905a0589605892b
timeCreated: 1507180488
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 100100000
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,13 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ceba2653fc9a3fc41b92315785f89440, type: 3}
m_Name: WaitInPlace
m_EditorClassIdentifier:

View file

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: a239cb93f4d18fa4baf7a01d44718dbb
timeCreated: 1507182235
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,13 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 56a0f4e2f06493a4e97f596ad8d0ead1, type: 3}
m_Name: InteractionCompleted
m_EditorClassIdentifier:

View file

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: b7c91a8a56fb7a54abe6a9098297f8bb
timeCreated: 1507182216
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -8,6 +8,6 @@ MonoBehaviour:
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8751dd1b36598eb4c9932df92c8b0774, type: 3}
m_Script: {fileID: 11500000, guid: 1408b2a1a74df8b4bb7d71896fd72b9d, type: 3}
m_Name: IsInteracting
m_EditorClassIdentifier:

View file

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: aca961c852aa698469b7c4d36142c175
timeCreated: 1507183693
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,7 +1,7 @@
fileFormatVersion: 2
guid: 8ef6720733d82934a856497b4d8157d8
guid: aed8389bb6c1d4d49ad5bf1d04d7be17
folderAsset: yes
timeCreated: 1506842162
timeCreated: 1506987054
licenseType: Free
DefaultImporter:
userData:

View file

@ -0,0 +1,13 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8751dd1b36598eb4c9932df92c8b0774, type: 3}
m_Name: InitiatedInteraction
m_EditorClassIdentifier:

View file

@ -0,0 +1,13 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 3f9fa98245568d74ca9c5ea641087346, type: 3}
m_Name: InteractionAccepted
m_EditorClassIdentifier:

View file

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: d1e5ed22b1756104794e4cdad03e7bd0
timeCreated: 1507178645
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -9,7 +9,7 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a3d87936679da304bb792186a3b641cd, type: 3}
m_Name: WaitForPassingMessagetoIdle
m_Name: PassingMessageToIdleTransition
m_EditorClassIdentifier:
fromState: PassingMessage
toState: Idle

View file

@ -13,4 +13,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
actions:
- {fileID: 11400000, guid: 2234a34b55804f1408179400cd3068e1, type: 2}
transitions: []
transitions:
- decision: {fileID: 11400000, guid: aca961c852aa698469b7c4d36142c175, type: 2}
trueState: {fileID: 11400000, guid: 963f4d74f828ef94d85740708e8ce1d0, type: 2}
transitionValue: 1

View file

@ -0,0 +1,19 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5a6a367e35acd7e44a0a598eaa1d6700, type: 3}
m_Name: WaitForInteractionToEnd
m_EditorClassIdentifier:
actions:
- {fileID: 11400000, guid: a239cb93f4d18fa4baf7a01d44718dbb, type: 2}
transitions:
- decision: {fileID: 11400000, guid: aca961c852aa698469b7c4d36142c175, type: 2}
trueState: {fileID: 11400000, guid: 78ec31c429ad5074bb50d001b1a49a77, type: 2}
transitionValue: 0

View file

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: 963f4d74f828ef94d85740708e8ce1d0
timeCreated: 1507182270
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -16,5 +16,5 @@ MonoBehaviour:
- {fileID: 11400000, guid: f6bbe4be217687b4d919a285ed2a98eb, type: 2}
transitions:
- decision: {fileID: 11400000, guid: ce72eaa68e3e07147a3aa891ff8f4a13, type: 2}
trueState: {fileID: 11400000, guid: f92df2056f917ce45921c2f8b94c75dd, type: 2}
trueState: {fileID: 11400000, guid: ed2af5dc9d7af8b4580705c19d61fb57, type: 2}
falseState: {fileID: 11400000, guid: 5eb84557ff3e09f42b843e0b09653774, type: 2}

View file

@ -9,15 +9,15 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5a6a367e35acd7e44a0a598eaa1d6700, type: 3}
m_Name: PassingMessage
m_Name: SpyInteract
m_EditorClassIdentifier:
actions:
- {fileID: 11400000, guid: 91379affb292c704cb05ff4059c565ae, type: 2}
- {fileID: 11400000, guid: 8f046fde7baf01047b31646cc02aa8d2, type: 2}
- {fileID: 11400000, guid: b241bf77cda4ed84992fa09741f347ef, type: 2}
transitions:
- decision: {fileID: 11400000, guid: a61bb8f83adfb6c44b3bb56e5163ec72, type: 2}
trueState: {fileID: 11400000, guid: 1c694dfd46dd4e44b94f7853724fa1c0, type: 2}
falseState: {fileID: 11400000, guid: 5eb84557ff3e09f42b843e0b09653774, type: 2}
transitionValue: 1
- decision: {fileID: 11400000, guid: 54c4574724be54540892c8db5aff93d1, type: 2}
trueState: {fileID: 11400000, guid: 1c694dfd46dd4e44b94f7853724fa1c0, type: 2}
falseState: {fileID: 11400000, guid: 5eb84557ff3e09f42b843e0b09653774, type: 2}
transitionValue: 1

View file

@ -0,0 +1,23 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5a6a367e35acd7e44a0a598eaa1d6700, type: 3}
m_Name: WaitingForAcceptance
m_EditorClassIdentifier:
actions:
- {fileID: 11400000, guid: b241bf77cda4ed84992fa09741f347ef, type: 2}
- {fileID: 11400000, guid: 309e42450c40f714a905a0589605892b, type: 2}
transitions:
- decision: {fileID: 11400000, guid: 54c4574724be54540892c8db5aff93d1, type: 2}
trueState: {fileID: 11400000, guid: 1c694dfd46dd4e44b94f7853724fa1c0, type: 2}
transitionValue: 1
- decision: {fileID: 11400000, guid: d1e5ed22b1756104794e4cdad03e7bd0, type: 2}
trueState: {fileID: 11400000, guid: f92df2056f917ce45921c2f8b94c75dd, type: 2}
transitionValue: 1

View file

@ -0,0 +1,9 @@
fileFormatVersion: 2
guid: ed2af5dc9d7af8b4580705c19d61fb57
timeCreated: 1507178547
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -9,25 +9,26 @@ public class StateController : SelectableObject
public State currentState;
public State remainState;
public State idleState;
public float INTERACT_RANGE = 2.0f;
public static readonly float INTERACT_RANGE = 1.5f;
[HideInInspector] public NavMeshAgent navMeshAgent;
[HideInInspector] public Animator animator;
[HideInInspector] public CharacterAnimator characterAnimator;
[HideInInspector] private SelectableObject selectedObject;
// Object Selector properties
private SelectableObject _selectedObject;
private Interaction _selectedInteraction;
private Coroutine _roamCoroutine;
// PhotonView Id of interacting character
[HideInInspector] private int queuedInteractorId;
// Text describing the type of interaction
[HideInInspector] public string interactionText;
public GameObject wayPointPrefab;
void Awake()
{
navMeshAgent = GetComponent<NavMeshAgent>();
if (!photonView.isMine)
{
navMeshAgent.obstacleAvoidanceType = ObstacleAvoidanceType.NoObstacleAvoidance;
navMeshAgent.updateRotation = false;
}
animator = GetComponent<Animator>();
characterAnimator = GetComponent<CharacterAnimator>();
}
@ -38,7 +39,7 @@ public class StateController : SelectableObject
currentState.DoStartActions(this);
}
public void Update()
public override void Update()
{
if (photonView.isMine)
{
@ -63,10 +64,12 @@ public class StateController : SelectableObject
if (stream.isWriting)
{
stream.SendNext(Destination);
stream.SendNext(navMeshAgent.stoppingDistance);
}
else
{
Destination = (Vector3)stream.ReceiveNext();
navMeshAgent.stoppingDistance = (float)stream.ReceiveNext();
}
}
@ -82,53 +85,39 @@ public class StateController : SelectableObject
}
}
// Manages other StateControllers signalling this controller for an interaction
public StateController Interactor
{
get
{
if (queuedInteractorId < 0)
return null;
PhotonView view = PhotonView.Find(queuedInteractorId);
if (view)
return view.GetComponent<StateController>();
else
return null;
}
set
{
queuedInteractorId = value.GetComponent<PhotonView>().viewID;
}
}
// Initiates interaction with other StateController
public void InteractWithController(StateController controller)
public void InitiateInteractionWithSelectedObject()
{
if (controller != this)
controller.Interactor = this;
else
if (SelectedObject == this)
Debug.LogError("Attempted to set interactor as self");
if (SelectedObject.IsInteracting)
Debug.Log(SelectedObject.name + " is busy and cannot interact with " + name);
Debug.Log("Sending interaction request...");
IsInteracting = true;
SelectedObject.Interactor = this;
}
public SelectableObject SelectedObject
{
get
{
return selectedObject;
return _selectedObject;
}
set
{
if (selectedObject != null)
selectedObject.Deselected();
selectedObject = value;
if (selectedObject != null)
if (_selectedObject != null)
_selectedObject.Deselected();
_selectedObject = value;
if (_selectedObject != null)
{
selectedObject.Selected();
navMeshAgent.stoppingDistance = 1.0f;
_selectedObject.Selected();
navMeshAgent.stoppingDistance = INTERACT_RANGE;
}
else
{
navMeshAgent.stoppingDistance = 0.3f;
navMeshAgent.stoppingDistance = 0.0f;
Destination = transform.position;
}
}
@ -136,7 +125,76 @@ public class StateController : SelectableObject
public override string GetInteractionTitle()
{
return "Player";
return name;
}
public static Vector3 GetRandomLocation()
{
float roomSize = 10.0f;
var randTarget = new Vector3(roomSize - (roomSize * 2 * UnityEngine.Random.value), 0.0f, roomSize - (roomSize * 2 * UnityEngine.Random.value));
NavMeshHit hit;
if (NavMesh.SamplePosition(randTarget, out hit, 1.0f, NavMesh.AllAreas))
return hit.position;
else
return GetRandomLocation();
}
public bool IsInteractionAccepted()
{
return IsInteracting && SelectedObject.IsInteracting && SelectedObject.Interactor == this;
}
public void FinishInteraction()
{
IsInteracting = false;
SelectedObject.Interactor = null;
SelectedObject = null;
}
public Interaction SelectedInteraction
{
get
{
return _selectedInteraction;
}
set
{
_selectedInteraction = value;
}
}
public void FaceInteractor()
{
if (Interactor == null)
Debug.LogError("Cannot face a null Interactor");
transform.LookAt(Interactor.transform);
}
public void FaceSelectedObject()
{
if (SelectedObject == null)
Debug.LogError("Cannot face a null SelectedObject");
transform.LookAt(SelectedObject.transform);
}
public void StartRoaming()
{
_roamCoroutine = StartCoroutine(Roam());
}
public void StopRoaming()
{
StopCoroutine(_roamCoroutine);
}
private IEnumerator Roam()
{
while (true)
{
yield return new WaitForSeconds(UnityEngine.Random.value * 10.0f);
Destination = GetRandomLocation();
}
}
}

View file

@ -1,10 +1,12 @@
fileFormatVersion: 2
guid: c93cbc6a57a861b4790af0898dde17a2
timeCreated: 1507019456
timeCreated: 1507080952
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
defaultReferences:
- glowCompositeShader: {fileID: 4800000, guid: 874640b11a2bbe24a8655c75d3544e5a,
type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:

View file

@ -1,10 +1,12 @@
fileFormatVersion: 2
guid: 618a83da395ad1d43ae9fa7ed4c1febe
timeCreated: 1507019456
timeCreated: 1507080998
licenseType: Free
MonoImporter:
serializedVersion: 2
defaultReferences: []
defaultReferences:
- glowShader: {fileID: 4800000, guid: 39d85d8c36c331e46af6e70a2b4e8d80, type: 3}
- blurShader: {fileID: 4800000, guid: f956270686a9d9e45bea04cd985135cc, type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:

View file

@ -8,8 +8,8 @@ using UnityEngine.SceneManagement;
public class GameManager : Photon.PunBehaviour {
public GuardCameraController guardCamera;
public GameObject spyPrefab, NCPPrefab, cameraRigPrefab;
private int numNCPs = 9;
public GameObject spyPrefab, NPCPrefab, cameraRigPrefab;
public int numNpcs = 9;
public int spyMissionsComplete = 0;
public float waitBetweenMissions = 5.0f;
public bool onMissionCooldown = false;
@ -53,7 +53,7 @@ public class GameManager : Photon.PunBehaviour {
else
{
guardCamera.GetComponent<GuardCamera>().laserSightEnabled = true;
Vector3 randPos = SimpleNPCBehavior.GetRandomLocation();
Vector3 randPos = StateController.GetRandomLocation();
var spy = PhotonNetwork.Instantiate(spyPrefab.name, randPos, Quaternion.identity, 0);
GameObject cameraRig = Instantiate(cameraRigPrefab, Vector3.zero, Quaternion.identity);
@ -63,10 +63,10 @@ public class GameManager : Photon.PunBehaviour {
if (PhotonNetwork.isMasterClient)
{
for (int i = 0; i < numNCPs; i++)
for (int i = 0; i < numNpcs; i++)
{
Vector3 randPos = SimpleNPCBehavior.GetRandomLocation();
PhotonNetwork.Instantiate(NCPPrefab.name, randPos, Quaternion.identity, 0);
Vector3 randPos = StateController.GetRandomLocation();
PhotonNetwork.Instantiate(NPCPrefab.name, randPos, Quaternion.identity, 0);
}
}
@ -87,7 +87,7 @@ public class GameManager : Photon.PunBehaviour {
[PunRPC]
void SpawnNPC(Vector3 pos)
{
Instantiate(NCPPrefab, pos, Quaternion.identity);
Instantiate(NPCPrefab, pos, Quaternion.identity);
}
[PunRPC]

View file

@ -1,80 +0,0 @@
using UnityEngine;
using System.Collections;
using UnityEngine.AI;
public class SimpleNPCBehavior : Photon.PunBehaviour
{
private bool setTarget = true;
enum State {
idle,
walking,
talking
};
void Start()
{
//agent = gameObject.AddComponent<NavMeshAgent>();
if (PhotonNetwork.isMasterClient) {
photonView.RPC("TeleportToTarget", PhotonTargets.All, GetRandomLocation());
photonView.RPC("SetColorRPC", PhotonTargets.All, new Vector3(Random.value, Random.value, Random.value));
Debug.Log("setting color");
}
}
void Update()
{
if (!PhotonNetwork.isMasterClient)
return;
if (setTarget)
{
setTarget = false;
StartCoroutine(UpdateDestination());
}
}
NavMeshAgent GetAgent()
{
return GetComponent<NavMeshAgent>();
}
IEnumerator UpdateDestination()
{
yield return new WaitForSeconds(Random.Range(0.1f, 10.0f));
Vector3 location = GetRandomLocation();
photonView.RPC("SetTarget", PhotonTargets.All, location);
setTarget = true;
}
public static Vector3 GetRandomLocation()
{
var randTarget = new Vector3(5.0f - (10.0f * Random.value), 0.0f, 5.0f - (10.0f * Random.value));
NavMeshHit hit;
if (NavMesh.SamplePosition(randTarget, out hit, 1.0f, NavMesh.AllAreas))
//return hit.position;
return new Vector3 (hit.position.x, 1.0f, hit.position.z);
else
return GetRandomLocation();
}
[PunRPC]
void SetTarget(Vector3 target)
{
GetAgent().destination = target;
}
[PunRPC]
void TeleportToTarget(Vector3 target)
{
GetAgent().Warp(target);
GetAgent().destination = target;
}
[PunRPC]
void SetColorRPC(Vector3 color)
{
transform.Find("Body").GetComponent<Renderer>().material.color = new Color(color.x, color.y, color.z);
}
}

View file

@ -1,9 +0,0 @@
fileFormatVersion: 2
guid: 2e01117c6df95774390afdd95c87be17
folderAsset: yes
timeCreated: 1506842089
licenseType: Free
DefaultImporter:
userData:
assetBundleName:
assetBundleVariant:

View file

@ -1,42 +0,0 @@
using UnityEngine;
using System.Collections;
public class PlayerController : MonoBehaviour
{
public GameObject particle;
public GameObject cameraRigPrefab;
private GameObject cameraRig;
public Transform cameraTarget;
private Vector3 target;
private Spy spy;
private int mask;
void Start()
{
int layerMask = LayerMask.NameToLayer("Floor");
mask = 1 << layerMask;
spy = GetComponent<Spy>();
cameraRig = Instantiate(cameraRigPrefab, Vector3.zero, Quaternion.identity);
cameraRig.GetComponentInChildren<ThirdPersonCameraController>().SetTarget(cameraTarget);
}
void Update()
{
RaycastHit hit;
if (Input.GetButtonDown("Fire1")) {
Ray ray = Camera.main.ScreenPointToRay(Input.mousePosition);
if (Physics.Raycast(ray, out hit, 100.0f, mask)) {
Vector3 wantedPos = hit.point;
Instantiate(particle, wantedPos, Quaternion.Euler(-90,0,0));
wantedPos.y = 0.5f;
spy.UpdateTarget(wantedPos);
}
}
if (Input.GetKeyDown("space"))
{
spy.HandShake();
}
}
}

View file

@ -1,109 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
public class Spy : Photon.PunBehaviour {
private NavMeshAgent agent;
public Animation shakeAnimation;
public bool isShaking = false;
public static HashSet<Spy> shakingSpies;
public GameObject nameTag;
void Start()
{
if (shakingSpies == null)
shakingSpies = new HashSet<Spy>();
agent = GetComponent<NavMeshAgent>();
if (!GetComponent<PlayerController>().enabled && PersistantPlayerSettings.character == PersistantPlayerSettings.Character.Spy)
{
nameTag.SetActive(true);
}
}
private void Update()
{
if (PhotonNetwork.isMasterClient)
{
if (SucessfulShakeCheck())
{
var manager = GameObject.FindGameObjectWithTag("GameManager").GetComponent<GameManager>();
manager.CompleteMission();
}
}
if (nameTag.activeInHierarchy)
{
nameTag.transform.LookAt(2 * nameTag.transform.position - Camera.main.transform.position);
}
}
bool SucessfulShakeCheck()
{
if (shakingSpies.Count > 1)
{
foreach (var spy1 in shakingSpies)
{
foreach (var spy2 in shakingSpies)
{
if (spy1.GetInstanceID() == spy2.GetInstanceID())
continue;
if (!spy1.isShaking || !spy2.isShaking)
continue;
float mag = (spy1.transform.position - spy2.transform.position).sqrMagnitude;
if (mag > 1.5)
continue;
float angle = Vector3.Angle(spy1.transform.forward, spy2.transform.forward);
if (angle < 140.0f)
continue;
return true;
}
}
}
return false;
}
public void UpdateTarget(Vector3 target)
{
photonView.RPC("UpdateTargetRPC", PhotonTargets.All, target);
}
[PunRPC]
void UpdateTargetRPC(Vector3 target)
{
agent.destination = target;
}
public void SetColor()
{
photonView.RPC("SetColorRPC", PhotonTargets.All, new Vector3(Random.value, Random.value, Random.value));
}
[PunRPC]
void SetColorRPC(Vector3 color)
{
transform.Find("Body").GetComponent<Renderer>().material.color = new Color(color.x, color.y, color.z);
}
public void HandShake()
{
if (!isShaking)
photonView.RPC("HandshakeRPC", PhotonTargets.All);
}
IEnumerator FinishShake()
{
yield return new WaitForSeconds(0.5f);
isShaking = false;
shakingSpies.Remove(this);
}
[PunRPC]
void HandshakeRPC()
{
isShaking = true;
shakingSpies.Add(this);
shakeAnimation.Play();
StartCoroutine(FinishShake());
}
}

View file

@ -1,18 +0,0 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpyCameraController : MonoBehaviour {
private float camSens = 100.0f;
private float xRotation;
void Start () {
xRotation = 0.0f;
}
void LateUpdate () {
xRotation = Time.deltaTime * Input.GetAxis ("Horizontal") * camSens;
transform.RotateAround (Vector3.zero, Vector3.up, -xRotation);
}
}

View file

@ -15,15 +15,15 @@ public class InteractionPanelController : MonoBehaviour {
Hide();
}
public void Reveal(string interactionText)
public static void Reveal(string interactionText)
{
this.interactionText.text = interactionText;
mainPanel.SetActive(true);
ActivePanel.interactionText.text = interactionText;
ActivePanel.mainPanel.SetActive(true);
}
public void Hide()
public static void Hide()
{
mainPanel.SetActive(false);
ActivePanel.mainPanel.SetActive(false);
}
public static InteractionPanelController ActivePanel
@ -45,4 +45,9 @@ public class InteractionPanelController : MonoBehaviour {
}
}
}
public static bool InteractionPrompted()
{
return ActivePanel.mainPanel.activeInHierarchy;
}
}