mirror of
https://github.com/ConjureETS/PillowFight.git
synced 2026-03-25 17:40:59 +00:00
Merge branch 'master' of https://github.com/ConjureETS/PillowFight
This commit is contained in:
commit
2418d5dec8
@ -19,7 +19,7 @@ Material:
|
|||||||
first:
|
first:
|
||||||
name: _MainTex
|
name: _MainTex
|
||||||
second:
|
second:
|
||||||
m_Texture: {fileID: 0}
|
m_Texture: {fileID: 2800000, guid: 48ae88018d91f93498ab72c5e26bf101, type: 3}
|
||||||
m_Scale: {x: 1, y: 1}
|
m_Scale: {x: 1, y: 1}
|
||||||
m_Offset: {x: 0, y: 0}
|
m_Offset: {x: 0, y: 0}
|
||||||
data:
|
data:
|
||||||
|
|||||||
@ -1069,7 +1069,9 @@ MonoBehaviour:
|
|||||||
GroundCheck: {fileID: 100272}
|
GroundCheck: {fileID: 100272}
|
||||||
pillow: {fileID: 0}
|
pillow: {fileID: 0}
|
||||||
Mom: {fileID: 0}
|
Mom: {fileID: 0}
|
||||||
|
Avatar: {fileID: 0}
|
||||||
Animator: {fileID: 9580008}
|
Animator: {fileID: 9580008}
|
||||||
|
AnimationPillow: {fileID: 134552}
|
||||||
target: {fileID: 0}
|
target: {fileID: 0}
|
||||||
--- !u!114 &11446734
|
--- !u!114 &11446734
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
@ -1082,7 +1084,7 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: e6ffb35a11ff1f545ac22f7ea752cffb, type: 3}
|
m_Script: {fileID: 11500000, guid: e6ffb35a11ff1f545ac22f7ea752cffb, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
PlayerNumber: 0
|
PlayerNumber: 1
|
||||||
--- !u!114 &11474836
|
--- !u!114 &11474836
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 1
|
m_ObjectHideFlags: 1
|
||||||
@ -1117,7 +1119,7 @@ SphereCollider:
|
|||||||
m_IsTrigger: 1
|
m_IsTrigger: 1
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Radius: .75
|
m_Radius: .519999981
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!136 &13685066
|
--- !u!136 &13685066
|
||||||
CapsuleCollider:
|
CapsuleCollider:
|
||||||
@ -1128,8 +1130,8 @@ CapsuleCollider:
|
|||||||
m_Material: {fileID: 0}
|
m_Material: {fileID: 0}
|
||||||
m_IsTrigger: 0
|
m_IsTrigger: 0
|
||||||
m_Enabled: 1
|
m_Enabled: 1
|
||||||
m_Radius: .5
|
m_Radius: .209999993
|
||||||
m_Height: 1
|
m_Height: 1.00999999
|
||||||
m_Direction: 1
|
m_Direction: 1
|
||||||
m_Center: {x: 0, y: 0, z: 0}
|
m_Center: {x: 0, y: 0, z: 0}
|
||||||
--- !u!137 &13704276
|
--- !u!137 &13704276
|
||||||
|
|||||||
@ -14,7 +14,7 @@ AnimatorController:
|
|||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
m_DefaultBool: 0
|
m_DefaultBool: 0
|
||||||
m_Controller: {fileID: 0}
|
m_Controller: {fileID: 0}
|
||||||
- m_Name: start_attack
|
- m_Name: StartAttack
|
||||||
m_Type: 9
|
m_Type: 9
|
||||||
m_DefaultFloat: 0
|
m_DefaultFloat: 0
|
||||||
m_DefaultInt: 0
|
m_DefaultInt: 0
|
||||||
@ -59,7 +59,7 @@ AnimatorStateTransition:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_Conditions:
|
m_Conditions:
|
||||||
- m_ConditionMode: 1
|
- m_ConditionMode: 1
|
||||||
m_ConditionEvent: start_attack
|
m_ConditionEvent: StartAttack
|
||||||
m_EventTreshold: 0
|
m_EventTreshold: 0
|
||||||
m_DstStateMachine: {fileID: 0}
|
m_DstStateMachine: {fileID: 0}
|
||||||
m_DstState: {fileID: 110284670}
|
m_DstState: {fileID: 110284670}
|
||||||
@ -434,7 +434,7 @@ AnimatorStateTransition:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_Conditions:
|
m_Conditions:
|
||||||
- m_ConditionMode: 1
|
- m_ConditionMode: 1
|
||||||
m_ConditionEvent: start_attack
|
m_ConditionEvent: StartAttack
|
||||||
m_EventTreshold: 0
|
m_EventTreshold: 0
|
||||||
m_DstStateMachine: {fileID: 0}
|
m_DstStateMachine: {fileID: 0}
|
||||||
m_DstState: {fileID: 110284670}
|
m_DstState: {fileID: 110284670}
|
||||||
|
|||||||
@ -620,6 +620,7 @@ Camera:
|
|||||||
m_OcclusionCulling: 1
|
m_OcclusionCulling: 1
|
||||||
m_StereoConvergence: 10
|
m_StereoConvergence: 10
|
||||||
m_StereoSeparation: .0219999999
|
m_StereoSeparation: .0219999999
|
||||||
|
m_StereoMirrorMode: 0
|
||||||
--- !u!4 &573037243
|
--- !u!4 &573037243
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -726,6 +727,146 @@ Prefab:
|
|||||||
propertyPath: RoomDoor
|
propertyPath: RoomDoor
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 544939640}
|
objectReference: {fileID: 544939640}
|
||||||
|
- target: {fileID: 120876, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22456076, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22456076, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: .189999998
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22456076, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22456076, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: .699999988
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22456076, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22456076, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22456076, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22456076, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11406010, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_PreserveAspect
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 188232, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22497504, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: .699999988
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22497504, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22497504, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22497504, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: .810000002
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22497504, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22497504, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 141632, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22484266, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: .189999998
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22484266, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22484266, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22484266, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: .300000012
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22484266, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22484266, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11406500, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_PreserveAspect
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11458950, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_PreserveAspect
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 180592, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22436868, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMin.x
|
||||||
|
value: .810000002
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22436868, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22436868, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22436868, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMax.x
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22436868, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: .300000012
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22436868, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 22436868, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11494372, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
|
propertyPath: m_PreserveAspect
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: dec23153e975cb94db47e642092ad58e, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
@ -2446,14 +2587,18 @@ Prefab:
|
|||||||
propertyPath: Mom
|
propertyPath: Mom
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 673576180}
|
objectReference: {fileID: 673576180}
|
||||||
- target: {fileID: 190616, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
|
||||||
propertyPath: m_Name
|
|
||||||
value: Child 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 11430644, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
- target: {fileID: 11430644, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
||||||
propertyPath: Avatar
|
propertyPath: Avatar
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 673576181}
|
objectReference: {fileID: 673576181}
|
||||||
|
- target: {fileID: 190616, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
||||||
|
propertyPath: m_Name
|
||||||
|
value: Child 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 11446734, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
||||||
|
propertyPath: PlayerNumber
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
|
|||||||
@ -598,38 +598,6 @@ Prefab:
|
|||||||
propertyPath: Mom
|
propertyPath: Mom
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1257411050}
|
objectReference: {fileID: 1257411050}
|
||||||
- target: {fileID: 11446734, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
|
||||||
propertyPath: PlayerNumber
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 11430644, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
|
||||||
propertyPath: hitPushBackForce
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 13685066, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
|
||||||
propertyPath: m_Material
|
|
||||||
value:
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 11430644, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
|
||||||
propertyPath: Speed
|
|
||||||
value: 2
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 5480620, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
|
||||||
propertyPath: m_AngularDrag
|
|
||||||
value: .0500000007
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 11430644, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
|
||||||
propertyPath: yAngleVector
|
|
||||||
value: 3
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 5480620, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
|
||||||
propertyPath: m_Mass
|
|
||||||
value: 1
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
- target: {fileID: 11430644, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
|
||||||
propertyPath: JumpForce
|
|
||||||
value: 200
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
@ -1046,6 +1014,7 @@ MonoBehaviour:
|
|||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
PlayerCount: 4
|
PlayerCount: 4
|
||||||
|
mom: {fileID: 1257411050}
|
||||||
--- !u!4 &945259370
|
--- !u!4 &945259370
|
||||||
Transform:
|
Transform:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -1097,10 +1066,6 @@ Prefab:
|
|||||||
propertyPath: m_RootOrder
|
propertyPath: m_RootOrder
|
||||||
value: 2
|
value: 2
|
||||||
objectReference: {fileID: 0}
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 6472040, guid: 0839912c1546d474686e48f2f1ea76fe, type: 2}
|
|
||||||
propertyPath: m_Material
|
|
||||||
value:
|
|
||||||
objectReference: {fileID: 0}
|
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: 0839912c1546d474686e48f2f1ea76fe, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: 0839912c1546d474686e48f2f1ea76fe, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
@ -2554,6 +2519,14 @@ Prefab:
|
|||||||
propertyPath: Mom
|
propertyPath: Mom
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1257411050}
|
objectReference: {fileID: 1257411050}
|
||||||
|
- target: {fileID: 11446734, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
||||||
|
propertyPath: PlayerNumber
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 134552, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
||||||
|
propertyPath: m_IsActive
|
||||||
|
value: 1
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_ParentPrefab: {fileID: 100100000, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
m_ParentPrefab: {fileID: 100100000, guid: 6dd661a967968c64dbae75c01fac6a09, type: 2}
|
||||||
m_IsPrefabParent: 0
|
m_IsPrefabParent: 0
|
||||||
|
|||||||
@ -5,7 +5,7 @@ using System.Collections.Generic;
|
|||||||
public class AutoTarget : MonoBehaviour
|
public class AutoTarget : MonoBehaviour
|
||||||
{
|
{
|
||||||
private List<Transform> targets;
|
private List<Transform> targets;
|
||||||
public float minAngleRange = 20f;
|
public float minAngleRange = 30f;
|
||||||
|
|
||||||
// Use this for initialization
|
// Use this for initialization
|
||||||
void Start ()
|
void Start ()
|
||||||
|
|||||||
@ -16,6 +16,7 @@ public class Child : MonoBehaviour
|
|||||||
public MomBehavior Mom;
|
public MomBehavior Mom;
|
||||||
public PlayerAvatar Avatar;
|
public PlayerAvatar Avatar;
|
||||||
public Animator Animator;
|
public Animator Animator;
|
||||||
|
public GameObject AnimationPillow;
|
||||||
|
|
||||||
private Rigidbody _rb;
|
private Rigidbody _rb;
|
||||||
private bool _isGrounded = false;
|
private bool _isGrounded = false;
|
||||||
@ -24,7 +25,7 @@ public class Child : MonoBehaviour
|
|||||||
private bool _isSleeping;
|
private bool _isSleeping;
|
||||||
private float _invulnerableTime;
|
private float _invulnerableTime;
|
||||||
private Bed _currentBed;
|
private Bed _currentBed;
|
||||||
public Transform target;
|
private bool _isInLava;
|
||||||
|
|
||||||
private int _index;
|
private int _index;
|
||||||
private bool _isPushed = false;
|
private bool _isPushed = false;
|
||||||
@ -44,6 +45,8 @@ public class Child : MonoBehaviour
|
|||||||
if (_numZ == 3) Die();
|
if (_numZ == 3) Die();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
private AutoTarget _autoTarget;
|
||||||
|
|
||||||
public int Index
|
public int Index
|
||||||
{
|
{
|
||||||
get { return _index; }
|
get { return _index; }
|
||||||
@ -59,6 +62,9 @@ public class Child : MonoBehaviour
|
|||||||
void Awake()
|
void Awake()
|
||||||
{
|
{
|
||||||
_rb = GetComponent<Rigidbody>();
|
_rb = GetComponent<Rigidbody>();
|
||||||
|
AnimationPillow.SetActive(false);
|
||||||
|
|
||||||
|
_autoTarget = GetComponent<AutoTarget>();
|
||||||
}
|
}
|
||||||
|
|
||||||
void Start()
|
void Start()
|
||||||
@ -71,11 +77,7 @@ public class Child : MonoBehaviour
|
|||||||
Animator.SetBool("IsOnBed", GetBed());
|
Animator.SetBool("IsOnBed", GetBed());
|
||||||
|
|
||||||
_isGrounded = IsGrounded();
|
_isGrounded = IsGrounded();
|
||||||
Debug.Log(_isGrounded);
|
|
||||||
// look at the target
|
|
||||||
if (target != null) {
|
|
||||||
transform.LookAt(target);
|
|
||||||
}
|
|
||||||
|
|
||||||
// We move the child depending on the camera orientation
|
// We move the child depending on the camera orientation
|
||||||
|
|
||||||
@ -202,12 +204,15 @@ public class Child : MonoBehaviour
|
|||||||
return colliders.Length > 0 ? colliders[0].GetComponent<Bed>() : null;
|
return colliders.Length > 0 ? colliders[0].GetComponent<Bed>() : null;
|
||||||
}
|
}
|
||||||
|
|
||||||
internal void Throw() {
|
public void Throw() {
|
||||||
|
if (_isInLava) return;
|
||||||
|
|
||||||
if (pillow != null) {
|
if (pillow != null) {
|
||||||
|
|
||||||
Vector3 direction;
|
Vector3 direction;
|
||||||
|
|
||||||
|
Transform target = _autoTarget.GetTarget(transform.forward);
|
||||||
|
|
||||||
if (target != null) {
|
if (target != null) {
|
||||||
direction = target.transform.position - pillow.transform.position;
|
direction = target.transform.position - pillow.transform.position;
|
||||||
}
|
}
|
||||||
@ -222,6 +227,9 @@ public class Child : MonoBehaviour
|
|||||||
pillow.IsOwned = false;
|
pillow.IsOwned = false;
|
||||||
|
|
||||||
pillow = null;
|
pillow = null;
|
||||||
|
|
||||||
|
target = null;
|
||||||
|
Animator.SetTrigger("StartAttack");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -250,6 +258,7 @@ public class Child : MonoBehaviour
|
|||||||
TakeLavaDamage();
|
TakeLavaDamage();
|
||||||
ActivateVibration(true);
|
ActivateVibration(true);
|
||||||
Animator.SetBool("IsOnLava", true);
|
Animator.SetBool("IsOnLava", true);
|
||||||
|
_isInLava = true;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
@ -269,6 +278,7 @@ public class Child : MonoBehaviour
|
|||||||
{
|
{
|
||||||
ActivateVibration(false);
|
ActivateVibration(false);
|
||||||
Animator.SetBool("IsOnLava", false);
|
Animator.SetBool("IsOnLava", false);
|
||||||
|
_isInLava = false;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -75,22 +75,14 @@ public class ChildController : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (xLookingValue != 0 || zLookingValue != 0) {
|
if (xLookingValue != 0 || zLookingValue != 0) {
|
||||||
//Transform target = _autoTarget.GetTarget(new Vector3(xLookingValue, 0, zLookingValue));
|
|
||||||
Transform target = _autoTarget.GetTarget(xLookingValue, zLookingValue);
|
|
||||||
|
|
||||||
_child.target = target;
|
transform.eulerAngles = new Vector3(
|
||||||
if (_child.target != null) {
|
|
||||||
transform.LookAt(_child.target);
|
|
||||||
}
|
|
||||||
else {
|
|
||||||
transform.eulerAngles = new Vector3(
|
|
||||||
transform.eulerAngles.x,
|
transform.eulerAngles.x,
|
||||||
Mathf.Atan2(xLookingValue, zLookingValue) * Mathf.Rad2Deg -90, // -90 to correct forward facing angle...
|
Mathf.Atan2(xLookingValue, zLookingValue) * Mathf.Rad2Deg -90, // -90 to correct forward facing angle...
|
||||||
transform.eulerAngles.z);
|
transform.eulerAngles.z);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
_child.target = null; // no auto targeting when not actively pressing the joystick in a direction
|
|
||||||
|
|
||||||
// if player is not look with the right joystick, then face the direction we're going
|
// if player is not look with the right joystick, then face the direction we're going
|
||||||
// if left joystick is used, else we don't change the facing direction
|
// if left joystick is used, else we don't change the facing direction
|
||||||
|
|||||||
@ -3,17 +3,14 @@
|
|||||||
--- !u!129 &1
|
--- !u!129 &1
|
||||||
PlayerSettings:
|
PlayerSettings:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
serializedVersion: 6
|
serializedVersion: 7
|
||||||
AndroidProfiler: 0
|
AndroidProfiler: 0
|
||||||
defaultScreenOrientation: 4
|
defaultScreenOrientation: 4
|
||||||
targetDevice: 2
|
targetDevice: 2
|
||||||
targetGlesGraphics: -1
|
|
||||||
targetIOSGraphics: -1
|
|
||||||
targetResolution: 0
|
targetResolution: 0
|
||||||
accelerometerFrequency: 60
|
accelerometerFrequency: 60
|
||||||
companyName: DefaultCompany
|
companyName: DefaultCompany
|
||||||
productName: PillowUnity
|
productName: PillowUnity
|
||||||
cloudProjectId:
|
|
||||||
defaultCursor: {fileID: 0}
|
defaultCursor: {fileID: 0}
|
||||||
cursorHotspot: {x: 0, y: 0}
|
cursorHotspot: {x: 0, y: 0}
|
||||||
m_ShowUnitySplashScreen: 1
|
m_ShowUnitySplashScreen: 1
|
||||||
@ -26,7 +23,6 @@ PlayerSettings:
|
|||||||
m_ActiveColorSpace: 0
|
m_ActiveColorSpace: 0
|
||||||
m_MTRendering: 1
|
m_MTRendering: 1
|
||||||
m_MobileMTRendering: 0
|
m_MobileMTRendering: 0
|
||||||
m_UseDX11: 1
|
|
||||||
m_Stereoscopic3D: 0
|
m_Stereoscopic3D: 0
|
||||||
iosShowActivityIndicatorOnLoading: -1
|
iosShowActivityIndicatorOnLoading: -1
|
||||||
androidShowActivityIndicatorOnLoading: -1
|
androidShowActivityIndicatorOnLoading: -1
|
||||||
@ -81,6 +77,7 @@ PlayerSettings:
|
|||||||
metroEnableIndependentInputSource: 0
|
metroEnableIndependentInputSource: 0
|
||||||
metroEnableLowLatencyPresentationAPI: 0
|
metroEnableLowLatencyPresentationAPI: 0
|
||||||
xboxOneDisableKinectGpuReservation: 0
|
xboxOneDisableKinectGpuReservation: 0
|
||||||
|
virtualRealitySupported: 0
|
||||||
productGUID: f74b42ae0c00e944a95d85e94fc9366e
|
productGUID: f74b42ae0c00e944a95d85e94fc9366e
|
||||||
AndroidBundleVersionCode: 1
|
AndroidBundleVersionCode: 1
|
||||||
AndroidMinSdkVersion: 9
|
AndroidMinSdkVersion: 9
|
||||||
@ -123,6 +120,7 @@ PlayerSettings:
|
|||||||
iOSLaunchScreenCustomXibPath:
|
iOSLaunchScreenCustomXibPath:
|
||||||
AndroidTargetDevice: 0
|
AndroidTargetDevice: 0
|
||||||
AndroidSplashScreenScale: 0
|
AndroidSplashScreenScale: 0
|
||||||
|
androidSplashScreen: {fileID: 0}
|
||||||
AndroidKeystoreName:
|
AndroidKeystoreName:
|
||||||
AndroidKeyaliasName:
|
AndroidKeyaliasName:
|
||||||
AndroidTVCompatibility: 1
|
AndroidTVCompatibility: 1
|
||||||
@ -136,6 +134,7 @@ PlayerSettings:
|
|||||||
resolutionDialogBanner: {fileID: 0}
|
resolutionDialogBanner: {fileID: 0}
|
||||||
m_BuildTargetIcons: []
|
m_BuildTargetIcons: []
|
||||||
m_BuildTargetBatching: []
|
m_BuildTargetBatching: []
|
||||||
|
m_BuildTargetGraphicsAPIs: []
|
||||||
webPlayerTemplate: APPLICATION:Default
|
webPlayerTemplate: APPLICATION:Default
|
||||||
m_TemplateCustomTags: {}
|
m_TemplateCustomTags: {}
|
||||||
actionOnDotNetUnhandledException: 1
|
actionOnDotNetUnhandledException: 1
|
||||||
@ -197,6 +196,7 @@ PlayerSettings:
|
|||||||
ps4ApplicationParam2: 0
|
ps4ApplicationParam2: 0
|
||||||
ps4ApplicationParam3: 0
|
ps4ApplicationParam3: 0
|
||||||
ps4ApplicationParam4: 0
|
ps4ApplicationParam4: 0
|
||||||
|
ps4GarlicHeapSize: 2048
|
||||||
ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
|
ps4Passcode: frAQBc8Wsa1xVPfvJcrgRYwTiizs2trQ
|
||||||
ps4pnSessions: 1
|
ps4pnSessions: 1
|
||||||
ps4pnPresence: 1
|
ps4pnPresence: 1
|
||||||
@ -339,8 +339,7 @@ PlayerSettings:
|
|||||||
blackberrySquareSplashScreen: {fileID: 0}
|
blackberrySquareSplashScreen: {fileID: 0}
|
||||||
tizenProductDescription:
|
tizenProductDescription:
|
||||||
tizenProductURL:
|
tizenProductURL:
|
||||||
tizenCertificatePath:
|
tizenSigningProfileName:
|
||||||
tizenCertificatePassword:
|
|
||||||
tizenGPSPermissions: 0
|
tizenGPSPermissions: 0
|
||||||
tizenMicrophonePermissions: 0
|
tizenMicrophonePermissions: 0
|
||||||
stvDeviceAddress:
|
stvDeviceAddress:
|
||||||
@ -402,4 +401,9 @@ PlayerSettings:
|
|||||||
WebGL::emscriptenArgs:
|
WebGL::emscriptenArgs:
|
||||||
WebGL::template: APPLICATION:Default
|
WebGL::template: APPLICATION:Default
|
||||||
additionalIl2CppArgs::additionalIl2CppArgs:
|
additionalIl2CppArgs::additionalIl2CppArgs:
|
||||||
firstStreamedLevelWithResources: 0
|
firstStreamedSceneWithResources: 0
|
||||||
|
cloudProjectId:
|
||||||
|
projectId:
|
||||||
|
projectName:
|
||||||
|
organizationId:
|
||||||
|
cloudEnabled: 0
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user