Erge branch 'master-with-aesthetics'

This commit is contained in:
Randall 2017-11-14 14:55:28 -06:00
commit 30dff852ba
16 changed files with 1103 additions and 47 deletions

View file

@ -0,0 +1,164 @@
fileFormatVersion: 2
guid: 42062e237bed7d546b981551106e39b6
timeCreated: 1510244271
licenseType: Free
ModelImporter:
serializedVersion: 21
fileIDToRecycleName:
100000: mixamorig:Head
100002: mixamorig:HeadTop_End
100004: mixamorig:Hips
100006: mixamorig:LeftArm
100008: mixamorig:LeftFoot
100010: mixamorig:LeftForeArm
100012: mixamorig:LeftHand
100014: mixamorig:LeftLeg
100016: mixamorig:LeftShoulder
100018: mixamorig:LeftToe_End
100020: mixamorig:LeftToeBase
100022: mixamorig:LeftUpLeg
100024: mixamorig:Neck
100026: mixamorig:RightArm
100028: mixamorig:RightFoot
100030: mixamorig:RightForeArm
100032: mixamorig:RightHand
100034: mixamorig:RightLeg
100036: mixamorig:RightShoulder
100038: mixamorig:RightToe_End
100040: mixamorig:RightToeBase
100042: mixamorig:RightUpLeg
100044: mixamorig:Spine
100046: mixamorig:Spine1
100048: mixamorig:Spine2
100050: //RootNode
400000: mixamorig:Head
400002: mixamorig:HeadTop_End
400004: mixamorig:Hips
400006: mixamorig:LeftArm
400008: mixamorig:LeftFoot
400010: mixamorig:LeftForeArm
400012: mixamorig:LeftHand
400014: mixamorig:LeftLeg
400016: mixamorig:LeftShoulder
400018: mixamorig:LeftToe_End
400020: mixamorig:LeftToeBase
400022: mixamorig:LeftUpLeg
400024: mixamorig:Neck
400026: mixamorig:RightArm
400028: mixamorig:RightFoot
400030: mixamorig:RightForeArm
400032: mixamorig:RightHand
400034: mixamorig:RightLeg
400036: mixamorig:RightShoulder
400038: mixamorig:RightToe_End
400040: mixamorig:RightToeBase
400042: mixamorig:RightUpLeg
400044: mixamorig:Spine
400046: mixamorig:Spine1
400048: mixamorig:Spine2
400050: //RootNode
7400000: Rummaging
9500000: //RootNode
materials:
importMaterials: 0
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations:
- serializedVersion: 16
name: Rummaging
takeName: mixamo.com
firstFrame: 0
lastFrame: 290
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 0
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 0.15
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,164 @@
fileFormatVersion: 2
guid: 685e3e6f9d6529443b01b1e9501bba4f
timeCreated: 1510263832
licenseType: Free
ModelImporter:
serializedVersion: 21
fileIDToRecycleName:
100000: mixamorig:Head
100002: mixamorig:HeadTop_End
100004: mixamorig:Hips
100006: mixamorig:LeftArm
100008: mixamorig:LeftFoot
100010: mixamorig:LeftForeArm
100012: mixamorig:LeftHand
100014: mixamorig:LeftLeg
100016: mixamorig:LeftShoulder
100018: mixamorig:LeftToe_End
100020: mixamorig:LeftToeBase
100022: mixamorig:LeftUpLeg
100024: mixamorig:Neck
100026: mixamorig:RightArm
100028: mixamorig:RightFoot
100030: mixamorig:RightForeArm
100032: mixamorig:RightHand
100034: mixamorig:RightLeg
100036: mixamorig:RightShoulder
100038: mixamorig:RightToe_End
100040: mixamorig:RightToeBase
100042: mixamorig:RightUpLeg
100044: mixamorig:Spine
100046: mixamorig:Spine1
100048: mixamorig:Spine2
100050: //RootNode
400000: mixamorig:Head
400002: mixamorig:HeadTop_End
400004: mixamorig:Hips
400006: mixamorig:LeftArm
400008: mixamorig:LeftFoot
400010: mixamorig:LeftForeArm
400012: mixamorig:LeftHand
400014: mixamorig:LeftLeg
400016: mixamorig:LeftShoulder
400018: mixamorig:LeftToe_End
400020: mixamorig:LeftToeBase
400022: mixamorig:LeftUpLeg
400024: mixamorig:Neck
400026: mixamorig:RightArm
400028: mixamorig:RightFoot
400030: mixamorig:RightForeArm
400032: mixamorig:RightHand
400034: mixamorig:RightLeg
400036: mixamorig:RightShoulder
400038: mixamorig:RightToe_End
400040: mixamorig:RightToeBase
400042: mixamorig:RightUpLeg
400044: mixamorig:Spine
400046: mixamorig:Spine1
400048: mixamorig:Spine2
400050: //RootNode
7400000: Surprised
9500000: //RootNode
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations:
- serializedVersion: 16
name: Surprised
takeName: mixamo.com
firstFrame: 0
lastFrame: 239
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 0
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 0.15
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,164 @@
fileFormatVersion: 2
guid: 96c09fcfc855b5b408b898185a2ab251
timeCreated: 1510263825
licenseType: Free
ModelImporter:
serializedVersion: 21
fileIDToRecycleName:
100000: mixamorig:Head
100002: mixamorig:HeadTop_End
100004: mixamorig:Hips
100006: mixamorig:LeftArm
100008: mixamorig:LeftFoot
100010: mixamorig:LeftForeArm
100012: mixamorig:LeftHand
100014: mixamorig:LeftLeg
100016: mixamorig:LeftShoulder
100018: mixamorig:LeftToe_End
100020: mixamorig:LeftToeBase
100022: mixamorig:LeftUpLeg
100024: mixamorig:Neck
100026: mixamorig:RightArm
100028: mixamorig:RightFoot
100030: mixamorig:RightForeArm
100032: mixamorig:RightHand
100034: mixamorig:RightLeg
100036: mixamorig:RightShoulder
100038: mixamorig:RightToe_End
100040: mixamorig:RightToeBase
100042: mixamorig:RightUpLeg
100044: mixamorig:Spine
100046: mixamorig:Spine1
100048: mixamorig:Spine2
100050: //RootNode
400000: mixamorig:Head
400002: mixamorig:HeadTop_End
400004: mixamorig:Hips
400006: mixamorig:LeftArm
400008: mixamorig:LeftFoot
400010: mixamorig:LeftForeArm
400012: mixamorig:LeftHand
400014: mixamorig:LeftLeg
400016: mixamorig:LeftShoulder
400018: mixamorig:LeftToe_End
400020: mixamorig:LeftToeBase
400022: mixamorig:LeftUpLeg
400024: mixamorig:Neck
400026: mixamorig:RightArm
400028: mixamorig:RightFoot
400030: mixamorig:RightForeArm
400032: mixamorig:RightHand
400034: mixamorig:RightLeg
400036: mixamorig:RightShoulder
400038: mixamorig:RightToe_End
400040: mixamorig:RightToeBase
400042: mixamorig:RightUpLeg
400044: mixamorig:Spine
400046: mixamorig:Spine1
400048: mixamorig:Spine2
400050: //RootNode
7400000: Talking
9500000: //RootNode
materials:
importMaterials: 1
materialName: 0
materialSearch: 1
animations:
legacyGenerateAnimations: 4
bakeSimulation: 0
resampleCurves: 1
optimizeGameObjects: 0
motionNodeName:
rigImportErrors:
rigImportWarnings:
animationImportErrors:
animationImportWarnings:
animationRetargetingWarnings:
animationDoRetargetingWarnings: 0
animationCompression: 1
animationRotationError: 0.5
animationPositionError: 0.5
animationScaleError: 0.5
animationWrapMode: 0
extraExposedTransformPaths: []
extraUserProperties: []
clipAnimations:
- serializedVersion: 16
name: Talking
takeName: mixamo.com
firstFrame: 0
lastFrame: 186
wrapMode: 0
orientationOffsetY: 0
level: 0
cycleOffset: 0
loop: 0
hasAdditiveReferencePose: 0
loopTime: 0
loopBlend: 0
loopBlendOrientation: 0
loopBlendPositionY: 0
loopBlendPositionXZ: 0
keepOriginalOrientation: 0
keepOriginalPositionY: 1
keepOriginalPositionXZ: 0
heightFromFeet: 0
mirror: 0
bodyMask: 01000000010000000100000001000000010000000100000001000000010000000100000001000000010000000100000001000000
curves: []
events: []
transformMask: []
maskType: 3
maskSource: {instanceID: 0}
additiveReferencePoseFrame: 0
isReadable: 1
meshes:
lODScreenPercentages: []
globalScale: 0.15
meshCompression: 0
addColliders: 0
importVisibility: 1
importBlendShapes: 1
importCameras: 1
importLights: 1
swapUVChannels: 0
generateSecondaryUV: 0
useFileUnits: 1
optimizeMeshForGPU: 1
keepQuads: 0
weldVertices: 1
secondaryUVAngleDistortion: 8
secondaryUVAreaDistortion: 15.000001
secondaryUVHardAngle: 88
secondaryUVPackMargin: 4
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1
copyAvatar: 0
humanDescription:
serializedVersion: 2
human: []
skeleton: []
armTwist: 0.5
foreArmTwist: 0.5
upperLegTwist: 0.5
legTwist: 0.5
armStretch: 0.05
legStretch: 0.05
feetSpacing: 0
rootMotionBoneName:
rootMotionBoneRotation: {x: 0, y: 0, z: 0, w: 1}
hasTranslationDoF: 0
hasExtraRoot: 0
skeletonHasParents: 1
lastHumanDescriptionAvatarSource: {instanceID: 0}
animationType: 2
humanoidOversampling: 1
additionalBone: 0
userData:
assetBundleName:
assetBundleVariant:

View file

@ -56,6 +56,12 @@ AnimatorController:
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
- m_Name: Rummage
m_Type: 9
m_DefaultFloat: 0
m_DefaultInt: 0
m_DefaultBool: 0
m_Controller: {fileID: 9100000}
m_AnimatorLayers:
- serializedVersion: 5
m_Name: Base Layer
@ -365,6 +371,30 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101306764199612622
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: Rummage
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102043972317331396}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.9874372
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101324464263039550
AnimatorStateTransition:
m_ObjectHideFlags: 1
@ -527,6 +557,30 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101622556350578540
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions:
- m_ConditionMode: 1
m_ConditionEvent: Interrupted
m_EventTreshold: 0
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102150790202348572}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0.0048084296
m_ExitTime: 0.9680734
m_HasExitTime: 0
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101775513785162602
AnimatorStateTransition:
m_ObjectHideFlags: 3
@ -596,6 +650,52 @@ AnimatorStateTransition:
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1101 &1101973041543346508
AnimatorStateTransition:
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name:
m_Conditions: []
m_DstStateMachine: {fileID: 0}
m_DstState: {fileID: 1102150790202348572}
m_Solo: 0
m_Mute: 0
m_IsExit: 0
serializedVersion: 3
m_TransitionDuration: 0.25
m_TransitionOffset: 0
m_ExitTime: 0.94827586
m_HasExitTime: 1
m_HasFixedDuration: 1
m_InterruptionSource: 0
m_OrderedInterruption: 1
m_CanTransitionToSelf: 1
--- !u!1102 &1102043972317331396
AnimatorState:
serializedVersion: 5
m_ObjectHideFlags: 1
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_Name: Rummaging
m_Speed: 1
m_CycleOffset: 0
m_Transitions:
- {fileID: 1101622556350578540}
- {fileID: 1101973041543346508}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 42062e237bed7d546b981551106e39b6, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
--- !u!1102 &1102075779692729400
AnimatorState:
serializedVersion: 5
@ -638,6 +738,7 @@ AnimatorState:
- {fileID: 1101338341885882894}
- {fileID: 1101541003412757350}
- {fileID: 1101160161055095008}
- {fileID: 1101306764199612622}
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
@ -771,7 +872,7 @@ AnimatorState:
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_Motion: {fileID: 7400000, guid: 92ea153e2e2782043826fa844e3f52d1, type: 3}
m_Motion: {fileID: 7400000, guid: 96c09fcfc855b5b408b898185a2ab251, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
@ -805,6 +906,9 @@ AnimatorStateMachine:
- serializedVersion: 1
m_State: {fileID: 1102165061342770366}
m_Position: {x: 348, y: -276, z: 0}
- serializedVersion: 1
m_State: {fileID: 1102043972317331396}
m_Position: {x: 348, y: -348, z: 0}
m_ChildStateMachines: []
m_AnyStateTransitions: []
m_EntryTransitions: []

View file

@ -11,7 +11,7 @@ ModelImporter:
3300000: //RootNode
4300000: Cube
materials:
importMaterials: 1
importMaterials: 0
materialName: 0
materialSearch: 1
animations:
@ -57,7 +57,7 @@ ModelImporter:
useFileScale: 1
tangentSpace:
normalSmoothAngle: 60
normalImportMode: 0
normalImportMode: 1
tangentImportMode: 3
normalCalculationMode: 4
importAnimation: 1

View file

@ -13,7 +13,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
interactionDescription: hide a secret message
receiverDescription: N/A
initiatorAnimationTrigger: 2
initiatorAnimationTrigger: 9
objectAnimationTrigger: 0
result: 1
initialRotation: 0

View file

@ -13,7 +13,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
interactionDescription: observe the object
receiverDescription: N/A
initiatorAnimationTrigger: 2
initiatorAnimationTrigger: 5
objectAnimationTrigger: 0
result: 0
initialRotation: 0

397
Project Undercover/Assets/Scenes/GameScene.unity Normal file → Executable file
View file

@ -154,7 +154,88 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 12
m_RootOrder: 15
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &61897354
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 61897358}
- component: {fileID: 61897357}
- component: {fileID: 61897356}
- component: {fileID: 61897355}
m_Layer: 0
m_Name: Camera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!81 &61897355
AudioListener:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 61897354}
m_Enabled: 1
--- !u!124 &61897356
Behaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 61897354}
m_Enabled: 1
--- !u!20 &61897357
Camera:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 61897354}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 2
m_BackGroundColor: {r: 0, g: 0, b: 0, a: 0}
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.3
far clip plane: 1000
field of view: 60
orthographic: 0
orthographic size: 5
m_Depth: -2
m_CullingMask:
serializedVersion: 2
m_Bits: 0
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
m_StereoMirrorMode: 0
--- !u!4 &61897358
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 61897354}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5.461338, y: 8.988628, z: 6.0364428}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 26
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &40329371
MonoBehaviour:
@ -280,7 +361,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 4294967295
m_IsActive: 1
m_IsActive: 0
--- !u!23 &110002463
MeshRenderer:
m_ObjectHideFlags: 0
@ -343,7 +424,7 @@ Transform:
m_LocalScale: {x: 20, y: 0.5, z: 20}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 16
m_RootOrder: 19
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &119593627
GameObject:
@ -949,7 +1030,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4661043116803332, guid: c67fa24334c0f364cad8798522e92116, type: 2}
propertyPath: m_RootOrder
value: 4
value: 5
objectReference: {fileID: 0}
- target: {fileID: 1889434021946074, guid: c67fa24334c0f364cad8798522e92116, type: 2}
propertyPath: m_Name
@ -1096,7 +1177,7 @@ Transform:
- {fileID: 422777569}
- {fileID: 748159508}
m_Father: {fileID: 0}
m_RootOrder: 19
m_RootOrder: 22
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &275339324
GameObject:
@ -1217,7 +1298,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 0bce433961afa4d488cf2e08bff4f86a, type: 3}
propertyPath: m_RootOrder
value: 2
value: 4
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 0bce433961afa4d488cf2e08bff4f86a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -1432,7 +1513,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: cc86ddd814bb12f43b57ded5958a2dd6, type: 3}
propertyPath: m_RootOrder
value: 1
value: 3
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: cc86ddd814bb12f43b57ded5958a2dd6, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -1639,7 +1720,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 22
m_RootOrder: 25
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &324022483
GameObject:
@ -1761,7 +1842,7 @@ MeshRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 422777568}
m_Enabled: 1
m_Enabled: 0
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
@ -2022,7 +2103,7 @@ Transform:
m_LocalScale: {x: 2, y: 3, z: 0.5}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 3
m_RootOrder: 9
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &678649002
GameObject:
@ -2106,7 +2187,7 @@ Transform:
m_LocalScale: {x: 3, y: 1, z: 5}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_RootOrder: 12
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -20}
--- !u!1 &710257908
GameObject:
@ -2461,6 +2542,93 @@ MeshFilter:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 748159507}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1 &751788723
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100004, guid: a37cdb9bad5b71943923b13ce79be4d0, type: 3}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 751788724}
- component: {fileID: 751788726}
- component: {fileID: 751788725}
- component: {fileID: 751788727}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &751788724
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 400004, guid: a37cdb9bad5b71943923b13ce79be4d0, type: 3}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 751788723}
m_LocalRotation: {x: -0.7071068, y: 0, z: -0, w: 0.7071067}
m_LocalPosition: {x: 0.75, y: 0, z: -0.66}
m_LocalScale: {x: 30.000002, y: 30.000002, z: 30.000002}
m_Children: []
m_Father: {fileID: 2120177223}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!23 &751788725
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 2300000, guid: a37cdb9bad5b71943923b13ce79be4d0,
type: 3}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 751788723}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 2100000, guid: 5a09eeae79deb374f81afdccb4cf674b, 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: 0
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 &751788726
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 3300000, guid: a37cdb9bad5b71943923b13ce79be4d0,
type: 3}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 751788723}
m_Mesh: {fileID: 4300000, guid: a37cdb9bad5b71943923b13ce79be4d0, type: 3}
--- !u!208 &751788727
NavMeshObstacle:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 751788723}
m_Enabled: 1
serializedVersion: 3
m_Shape: 1
m_Extents: {x: 0.040000003, y: 0.024, z: 0.018000001}
m_MoveThreshold: 0.1
m_Carve: 1
m_CarveOnlyStationary: 1
m_Center: {x: 0, y: 0.004, z: 0.018000001}
m_TimeToStationary: 0.5
--- !u!1 &755904694
GameObject:
m_ObjectHideFlags: 0
@ -2926,7 +3094,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 13
m_RootOrder: 16
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &919019020
GameObject:
@ -3008,7 +3176,7 @@ Transform:
m_LocalScale: {x: 1.5, y: 1, z: 3}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 10
m_RootOrder: 13
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &948654262
GameObject:
@ -3386,7 +3554,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4661043116803332, guid: c67fa24334c0f364cad8798522e92116, type: 2}
propertyPath: m_RootOrder
value: 5
value: 7
objectReference: {fileID: 0}
- target: {fileID: 1889434021946074, guid: c67fa24334c0f364cad8798522e92116, type: 2}
propertyPath: m_Name
@ -3546,12 +3714,12 @@ Prefab:
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
type: 2}
propertyPath: m_LocalPosition.x
value: 0
value: 528
objectReference: {fileID: 0}
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
type: 2}
propertyPath: m_LocalPosition.y
value: 0
value: 270.5
objectReference: {fileID: 0}
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
type: 2}
@ -3581,7 +3749,7 @@ Prefab:
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
type: 2}
propertyPath: m_RootOrder
value: 9
value: 10
objectReference: {fileID: 0}
- target: {fileID: 224257512679546302, guid: 2e0806d99e91f374fb64a63401c2eb5d,
type: 2}
@ -3752,7 +3920,7 @@ Transform:
- {fileID: 245333019}
- {fileID: 1703113350}
m_Father: {fileID: 0}
m_RootOrder: 21
m_RootOrder: 24
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1244254395
GameObject:
@ -3998,7 +4166,7 @@ Transform:
m_LocalScale: {x: 0.5, y: 1, z: 0.5}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 15
m_RootOrder: 18
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1337664802
GameObject:
@ -4201,7 +4369,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 4661043116803332, guid: c67fa24334c0f364cad8798522e92116, type: 2}
propertyPath: m_RootOrder
value: 6
value: 8
objectReference: {fileID: 0}
- target: {fileID: 20437103875467350, guid: c67fa24334c0f364cad8798522e92116,
type: 2}
@ -4329,7 +4497,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 2}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 20
m_RootOrder: 23
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1500738973
GameObject:
@ -4476,7 +4644,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 14
m_RootOrder: 17
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!1 &1607716621
GameObject:
@ -4558,7 +4726,7 @@ Transform:
m_LocalScale: {x: 5, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_RootOrder: 11
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1622088805
GameObject:
@ -4598,7 +4766,7 @@ MeshRenderer:
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1622088805}
m_Enabled: 1
m_Enabled: 0
m_CastShadows: 0
m_ReceiveShadows: 0
m_MotionVectors: 1
@ -4684,7 +4852,7 @@ Transform:
- {fileID: 1337664803}
- {fileID: 1171927423}
m_Father: {fileID: 0}
m_RootOrder: 18
m_RootOrder: 21
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1694395104
GameObject:
@ -4933,6 +5101,79 @@ MeshFilter:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1794775441}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &1833078408
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalPosition.x
value: 3.4508705
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalPosition.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalPosition.z
value: 2.5442045
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071067
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_RootOrder
value: 2
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalScale.x
value: 30
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalScale.y
value: 30
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
propertyPath: m_LocalScale.z
value: 20
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
m_IsPrefabParent: 0
--- !u!1 &1833078409 stripped
GameObject:
m_PrefabParentObject: {fileID: 100000, guid: 9d5aaa24b59341a4fa10f52e763c9db2, type: 3}
m_PrefabInternal: {fileID: 1833078408}
--- !u!208 &1833078410
NavMeshObstacle:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1833078409}
m_Enabled: 1
serializedVersion: 3
m_Shape: 1
m_Extents: {x: 0.031000001, y: 0.031000001, z: 0.017}
m_MoveThreshold: 0.1
m_Carve: 1
m_CarveOnlyStationary: 1
m_Center: {x: 0, y: 0, z: 0.017}
m_TimeToStationary: 0.5
--- !u!1 &1851441020
GameObject:
m_ObjectHideFlags: 0
@ -5097,6 +5338,79 @@ MeshFilter:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1873757200}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!1001 &1874750206
Prefab:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalPosition.x
value: -6.72
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalPosition.y
value: 0.02
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalPosition.z
value: -3.37
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071067
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalScale.x
value: 20
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalScale.y
value: 20
objectReference: {fileID: 0}
- target: {fileID: 400000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
propertyPath: m_LocalScale.z
value: 20
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
m_IsPrefabParent: 0
--- !u!1 &1874750207 stripped
GameObject:
m_PrefabParentObject: {fileID: 100000, guid: b0fcd2c68ef5cf148b7e650a0b026b96, type: 3}
m_PrefabInternal: {fileID: 1874750206}
--- !u!208 &1874750208
NavMeshObstacle:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1874750207}
m_Enabled: 1
serializedVersion: 3
m_Shape: 1
m_Extents: {x: 0.014, y: 0.011000001, z: 0.026}
m_MoveThreshold: 0.1
m_Carve: 0
m_CarveOnlyStationary: 1
m_Center: {x: 0.001, y: -0.001, z: 0.026}
m_TimeToStationary: 0.5
--- !u!84 &1913486489
RenderTexture:
m_ObjectHideFlags: 0
@ -5184,7 +5498,7 @@ Transform:
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 11
m_RootOrder: 14
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!84 &1979078171
RenderTexture:
@ -5440,5 +5754,34 @@ Transform:
m_LocalScale: {x: 20, y: 0.1, z: 20}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 17
m_RootOrder: 20
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2120177222
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 100002, guid: a37cdb9bad5b71943923b13ce79be4d0, type: 3}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2120177223}
m_Layer: 0
m_Name: couch
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2120177223
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 400002, guid: a37cdb9bad5b71943923b13ce79be4d0, type: 3}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2120177222}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 3.0229847, y: 0.020000001, z: -2.208767}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 751788724}
m_Father: {fileID: 0}
m_RootOrder: 6
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}

View file

@ -1,6 +1,6 @@
fileFormatVersion: 2
guid: 81dcf7f0f9bbf8d489e54b8112156b28
timeCreated: 1510208134
timeCreated: 1510263437
licenseType: Free
NativeFormatImporter:
mainObjectFileID: 23800000

View file

@ -9,7 +9,7 @@ public class CharacterAnimator : Photon.PunBehaviour
public enum Params
{
Idle, MoveSpeed, PassingMessage, Interrupted, Wave, Acknowledging, Handshake, Interacting, Bow
Idle, MoveSpeed, PassingMessage, Interrupted, Wave, Acknowledging, Handshake, Interacting, Bow, Rummage
}
protected virtual void Awake()

View file

@ -11,6 +11,8 @@ public class GuardCamera : Photon.PunBehaviour {
private float xRotation = 0.0f;
private float yRotation = 0.0f;
private string mName;
private List<int> mPlayers; // Photo Player IDs
[SerializeField]
@ -23,6 +25,9 @@ public class GuardCamera : Photon.PunBehaviour {
mCamera = GetComponent<Camera>();
mListener = GetComponent<AudioListener>();
// Get the name of this camera.
mName = this.name;
// Everything off by default
mSpotlight.enabled = false;
mCamera.enabled = false;
@ -75,6 +80,32 @@ public class GuardCamera : Photon.PunBehaviour {
photonView.RPC("RemovePlayer", PhotonTargets.All, PhotonNetwork.player.ID);
}
/**
* Disable preview mode. See EnablePreviewMode().
*/
public void DisablePreviewMode()
{
// Turn off the camera.
mCamera.enabled = false;
// Reset the viewport to original dimensions.
mCamera.rect = new Rect(0.0f, 0.0f, 1.0f, 1.0f);
}
/**
* Enable preview mode, which allows cameras to be viewed side-by-side
* like a guard screen.
*/
public void EnablePreviewMode(float size, int x, int y)
{
// Turn on the camera in case it was disabled, but disable sound.
mCamera.enabled = true;
mListener.enabled = false;
// Set the viewport appropriately.
mCamera.rect = new Rect(size * x, size * y, size, size);
}
public bool InControl()
{
if (mPlayers.Count == 0 || mPlayers[0] != PhotonNetwork.player.ID)

View file

@ -6,14 +6,14 @@ public class GuardController : Photon.PunBehaviour {
public Text cameraStatusText;
const float CAMERA_SENSITIVITY = 120.0f;
const float CAMERA_SENSITIVITY = 120.0f;
private int mCurrentCamera;
private int mCurrentCamera; // -1 means preview mode
private List<GuardCamera> mCameras;
private bool mInControl;
void Start()
void Start()
{
// Fetch all cameras
mCameras = new List<GuardCamera>();
@ -26,10 +26,47 @@ public class GuardController : Photon.PunBehaviour {
}
}
// Default is no camera. First to get it in Update wins.
// Photon doesn't seem to sync camera players until update,
// so if we Activate() here, it won't lock.
// Default is preview mode.
mCurrentCamera = -1;
EnablePreviewMode();
}
/**
* Disable preview mode on all cameras.
*/
void DisablePreviewMode()
{
if (mCurrentCamera >= 0)
{
return;
}
foreach (var guardCamera in mCameras)
{
guardCamera.DisablePreviewMode();
}
}
/**
* Enable preview mode on call cameras and position them appropriately.
*/
void EnablePreviewMode()
{
// Deactivate current camera, if necessary.
if (mCurrentCamera != -1)
{
mCameras[mCurrentCamera].Deactivate();
}
mCurrentCamera = -1;
// Cameras are always arranged in ZxZ rows and columns. Determine Z.
int z = (int) Mathf.Ceil(Mathf.Sqrt(mCameras.Count));
float size = 1.0f / z;
// Set all cameras to preview mode appropriately.
for (int i = 0; i < mCameras.Count; ++i)
{
mCameras[i].EnablePreviewMode(size, i % z, i / z);
}
}
/**
@ -37,6 +74,9 @@ public class GuardController : Photon.PunBehaviour {
*/
void SetCameraText()
{
// TODO - GuardCamera should be responsible for text.
// Each GuardCamera should display its name in colored text.
// Red denotes that it is owned by another player, Green denotes free.
if (mInControl)
{
cameraStatusText.text = "In-Control";
@ -48,14 +88,13 @@ public class GuardController : Photon.PunBehaviour {
}
/**
* Cycle the player to the next camera, or grab the first camera
* if we don't have one yet.
* Cycle the player to a specific camera, or just the next one.
*/
void SwitchCamera()
void SwitchCamera(int nextCamera = -1)
{
// Get relevant camera indexes
int lastCamera = mCurrentCamera;
mCurrentCamera += 1;
mCurrentCamera = nextCamera == -1 ? mCurrentCamera + 1 : nextCamera;
if (mCurrentCamera >= mCameras.Count)
{
mCurrentCamera = 0;
@ -80,7 +119,54 @@ public class GuardController : Photon.PunBehaviour {
void Update()
{
if (Input.GetKeyDown("space") || mCurrentCamera == -1)
if (mCurrentCamera < 0)
{
UpdatePreviewMode();
}
else
{
UpdateSingle();
}
}
void UpdatePreviewMode()
{
// If the player clicks a camera, switch to that camera.
if (Input.GetButtonDown("Fire1"))
{
// Get the click location.
float x = Input.mousePosition.x / Screen.width;
float y = Input.mousePosition.y / Screen.height;
// Cameras are always arranged in ZxZ rows and columns. Determine Z.
int z = (int)Mathf.Ceil(Mathf.Sqrt(mCameras.Count));
float size = 1.0f / z;
// Determine the camera that the click corresponds to, if any.
int tileX = (int) (x / size);
int tileY = (int) (y / size);
int camera = tileY * z + tileX;
// If the camera is valid, switch to it.
if (camera < mCameras.Count)
{
DisablePreviewMode();
SwitchCamera(camera);
}
}
}
void UpdateSingle()
{
// Escape switches to Preview Mode.
if (Input.GetKeyDown("escape"))
{
EnablePreviewMode();
return;
}
// Space switches to next camera.
if (Input.GetKeyDown("space"))
{
SwitchCamera();
}
@ -119,5 +205,5 @@ public class GuardController : Photon.PunBehaviour {
float xRotation = Time.deltaTime * Input.GetAxis("Horizontal") * CAMERA_SENSITIVITY;
float yRotation = Time.deltaTime * -Input.GetAxis("Vertical") * CAMERA_SENSITIVITY;
GetCurrentGuardCamera().Rotate(xRotation, yRotation);
}
}
}
}