Add pREFABS FOR DoubleJump, pushPull and Dash skills

This commit is contained in:
haitem 2021-01-30 22:19:31 +01:00
parent 80b64561f7
commit bdc0c7ec31
10 changed files with 747 additions and 31 deletions

View File

@ -336,6 +336,7 @@ MonoBehaviour:
actualHealth: 100 actualHealth: 100
onGround: 1 onGround: 1
activeAbility: 00000000 activeAbility: 00000000
PowerPrefabs: []
dashPower: 40 dashPower: 40
dashTime: 0.2 dashTime: 0.2
--- !u!95 &7009705026125325791 --- !u!95 &7009705026125325791

View File

@ -0,0 +1,164 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &7945524436670112111
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1593063039033634447}
- component: {fileID: 4848440137421042020}
- component: {fileID: 7836076122151817311}
m_Layer: 0
m_Name: PowerDash
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1593063039033634447
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7945524436670112111}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -7.346, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 5945663955776413348}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &4848440137421042020
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7945524436670112111}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 08fe7369accc1464499b2f2a75559298, type: 3}
m_Name:
m_EditorClassIdentifier:
powerType: 7
powerTime: 0
powerUnit: 0
nextSceneName:
--- !u!65 &7836076122151817311
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7945524436670112111}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 0.55, z: 1}
m_Center: {x: 0, y: 0.4, z: 0}
--- !u!1001 &6127574593887074639
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1593063039033634447}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalScale.x
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalScale.y
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalScale.z
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -7635826562936255635, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_Materials.Array.size
value: 2
objectReference: {fileID: 0}
- target: {fileID: -7635826562936255635, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_Materials.Array.data[1]
value:
objectReference: {fileID: 2100000, guid: 49025a60961b95a43986697748175308, type: 2}
- target: {fileID: 919132149155446097, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_Name
value: SkillCube
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a2c33b905bb71c74aacdeca187b58abf, type: 3}
--- !u!4 &5945663955776413348 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
m_PrefabInstance: {fileID: 6127574593887074639}
m_PrefabAsset: {fileID: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 2d077f1b027540045b6833e51a067855
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,164 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &200189416050843931
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8833996703784759035}
- component: {fileID: 3443571237732921616}
- component: {fileID: 16975228683882539}
m_Layer: 0
m_Name: PowerDoubleJump
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &8833996703784759035
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 200189416050843931}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2.58, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 4467613211269340880}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &3443571237732921616
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 200189416050843931}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 08fe7369accc1464499b2f2a75559298, type: 3}
m_Name:
m_EditorClassIdentifier:
powerType: 5
powerTime: 0
powerUnit: 0
nextSceneName:
--- !u!65 &16975228683882539
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 200189416050843931}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 0.55, z: 1}
m_Center: {x: 0, y: 0.4, z: 0}
--- !u!1001 &4146302289838111035
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 8833996703784759035}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalScale.x
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalScale.y
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalScale.z
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -7635826562936255635, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_Materials.Array.size
value: 2
objectReference: {fileID: 0}
- target: {fileID: -7635826562936255635, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_Materials.Array.data[1]
value:
objectReference: {fileID: 2100000, guid: 49025a60961b95a43986697748175308, type: 2}
- target: {fileID: 919132149155446097, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_Name
value: SkillCube
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a2c33b905bb71c74aacdeca187b58abf, type: 3}
--- !u!4 &4467613211269340880 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
m_PrefabInstance: {fileID: 4146302289838111035}
m_PrefabAsset: {fileID: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 3ddcad8db762bdf41b5b49fff6fb6a3b
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,164 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2644881069278570743
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6695479724104099607}
- component: {fileID: 700788770895788284}
- component: {fileID: 2760698352146241991}
m_Layer: 0
m_Name: PowerPushPull
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6695479724104099607
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2644881069278570743}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 2.58, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 1761911225665247036}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &700788770895788284
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2644881069278570743}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 08fe7369accc1464499b2f2a75559298, type: 3}
m_Name:
m_EditorClassIdentifier:
powerType: 6
powerTime: 0
powerUnit: 0
nextSceneName:
--- !u!65 &2760698352146241991
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2644881069278570743}
m_Material: {fileID: 0}
m_IsTrigger: 1
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 0.55, z: 1}
m_Center: {x: 0, y: 0.4, z: 0}
--- !u!1001 &2303918390432084183
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 6695479724104099607}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalScale.x
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalScale.y
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalScale.z
value: 0.1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalPosition.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalPosition.y
value: 0.4
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -7635826562936255635, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_Materials.Array.size
value: 2
objectReference: {fileID: 0}
- target: {fileID: -7635826562936255635, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_Materials.Array.data[1]
value:
objectReference: {fileID: 2100000, guid: 49025a60961b95a43986697748175308, type: 2}
- target: {fileID: 919132149155446097, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
propertyPath: m_Name
value: SkillCube
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: a2c33b905bb71c74aacdeca187b58abf, type: 3}
--- !u!4 &1761911225665247036 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: a2c33b905bb71c74aacdeca187b58abf,
type: 3}
m_PrefabInstance: {fileID: 2303918390432084183}
m_PrefabAsset: {fileID: 0}

View File

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 94642d7ef8c97e544af1d5ca3596a37f
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -444,75 +444,213 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!1001 &1313665106 --- !u!1001 &2549885454013026912
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
serializedVersion: 2 serializedVersion: 2
m_Modification: m_Modification:
m_TransformParent: {fileID: 0} m_TransformParent: {fileID: 0}
m_Modifications: m_Modifications:
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder
value: 6 value: 8
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalPosition.x propertyPath: m_LocalPosition.x
value: 3.64 value: -7.346
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalPosition.y propertyPath: m_LocalPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalPosition.z propertyPath: m_LocalPosition.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 1 value: 1
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalRotation.z propertyPath: m_LocalRotation.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657726, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 2773067093461657727, guid: 712671f8cf5fa684cbcb1159d45b0057, - target: {fileID: 7945524436670112111, guid: 2d077f1b027540045b6833e51a067855,
type: 3} type: 3}
propertyPath: m_Name propertyPath: m_Name
value: Artifac value: PowerDash
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 712671f8cf5fa684cbcb1159d45b0057, type: 3} m_SourcePrefab: {fileID: 100100000, guid: 2d077f1b027540045b6833e51a067855, type: 3}
--- !u!1001 &2899619782413736478
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 200189416050843931, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_Name
value: PowerDoubleJump
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalPosition.x
value: 2.58
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b, type: 3}
--- !u!1001 &3013606953711284009
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 2644881069278570743, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_Name
value: PowerPushPull
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_RootOrder
value: 7
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalPosition.x
value: -2.302
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 94642d7ef8c97e544af1d5ca3596a37f, type: 3}
--- !u!1001 &6840056971477016067 --- !u!1001 &6840056971477016067
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -525,6 +663,29 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Player value: Player
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3}
propertyPath: PowerPrefabs.Array.size
value: 3
objectReference: {fileID: 0}
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3}
propertyPath: PowerPrefabs.Array.data[0]
value:
objectReference: {fileID: 200189416050843931, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
type: 3}
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3}
propertyPath: PowerPrefabs.Array.data[1]
value:
objectReference: {fileID: 2644881069278570743, guid: 94642d7ef8c97e544af1d5ca3596a37f,
type: 3}
- target: {fileID: 7094923891560833916, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3}
propertyPath: PowerPrefabs.Array.data[2]
value:
objectReference: {fileID: 7945524436670112111, guid: 2d077f1b027540045b6833e51a067855,
type: 3}
- target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8, - target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
type: 3} type: 3}
propertyPath: m_RootOrder propertyPath: m_RootOrder

View File

@ -20,6 +20,7 @@ public class PlayerManager : MonoBehaviour
private bool interact = false; private bool interact = false;
public List<int> activeAbility = new List<int>(); //without ability=0 or null, dubleJump = 1, push/pull = 2, dash = 3 public List<int> activeAbility = new List<int>(); //without ability=0 or null, dubleJump = 1, push/pull = 2, dash = 3
public List<GameObject> PowerPrefabs = new List<GameObject>(); //dubleJump = 0, push/pull = 1, dash = 2
private bool dubleJump = true; private bool dubleJump = true;
private GameObject pushPullObject; private GameObject pushPullObject;
public float dashPower = 40f; public float dashPower = 40f;
@ -65,8 +66,12 @@ public class PlayerManager : MonoBehaviour
} }
if (interact) if (interact)
{ {
if (powerCubeManager.powerType == PowerCubeManager.PowerType.Artefact) if (powerCubeManager != null && (
{ powerCubeManager.powerType == PowerCubeManager.PowerType.Artefact ||
powerCubeManager.powerType == PowerCubeManager.PowerType.DubleJump ||
powerCubeManager.powerType == PowerCubeManager.PowerType.PushPull ||
powerCubeManager.powerType == PowerCubeManager.PowerType.Dash
)) {
if (Input.GetKeyUp(KeyCode.E)) if (Input.GetKeyUp(KeyCode.E))
{ {
playerAnimator.SetTrigger("Eat"); playerAnimator.SetTrigger("Eat");
@ -229,26 +234,52 @@ public class PlayerManager : MonoBehaviour
{ {
if (rigidBody.velocity.y <= 1 && (onGround || (dubleJump && activeAbility.Count > 0 && activeAbility[0] == 1))) if (rigidBody.velocity.y <= 1 && (onGround || (dubleJump && activeAbility.Count > 0 && activeAbility[0] == 1)))
{ {
pushPullObject = null;
rigidBody.AddForce(
(transform.right * (run ? runSpeed : speed) * 15 * Input.GetAxis("Horizontal") * Time.deltaTime) +
(transform.up * jump * 10 * Time.deltaTime),
ForceMode.VelocityChange
);
if (!onGround) if (!onGround)
{ {
dubleJump = false; dubleJump = false;
} }
pushPullObject = null;
rigidBody.AddForce(
(transform.right * (run ? runSpeed : speed) * 5 * Input.GetAxis("Horizontal") * Time.deltaTime) +
(transform.up * jump * 10 * Time.deltaTime),
ForceMode.VelocityChange
);
} }
} }
} }
private void DropPower()
{
if (activeAbility.Count > 0 && activeAbility[0] != 0)
{
Instantiate(PowerPrefabs[activeAbility[0] - 1], new Vector3(transform.position.x, transform.position.y - 0.5f, transform.position.z + 0.5f), PowerPrefabs[activeAbility[0] - 1].transform.rotation);
}
}
public void ActivePowerCube(float power, float powerTime, PowerCubeManager.PowerType powerType, string nextSceneName = "") public void ActivePowerCube(float power, float powerTime, PowerCubeManager.PowerType powerType, string nextSceneName = "")
{ {
if ((powerType.GetHashCode() - 1) == 3) if ((powerType.GetHashCode() - 1) == 3)
{ {
SceneManager.LoadScene(nextSceneName); SceneManager.LoadScene(nextSceneName);
} }
else if ((powerType.GetHashCode() - 1) == 4)
{
DropPower();
//doubleJump
activeAbility[0] = 1;
}
else if ((powerType.GetHashCode() - 1) == 5)
{
DropPower();
//pushpull
activeAbility[0] = 2;
}
else if ((powerType.GetHashCode() - 1) == 6)
{
DropPower();
//dash
activeAbility[0] = 3;
}
else if (actualPowerTimes.Length <= (powerType.GetHashCode()) || actualPowerTimes[powerType.GetHashCode() - 1] < Time.time) else if (actualPowerTimes.Length <= (powerType.GetHashCode()) || actualPowerTimes[powerType.GetHashCode() - 1] < Time.time)
{ {
actualPowerTimes[powerType.GetHashCode() - 1] = Time.time + powerTime; actualPowerTimes[powerType.GetHashCode() - 1] = Time.time + powerTime;
@ -335,7 +366,7 @@ public class PlayerManager : MonoBehaviour
if (other.tag == "Ground" || other.tag == "Objects") if (other.tag == "Ground" || other.tag == "Objects")
{ {
rigidBody.AddForce( rigidBody.AddForce(
(transform.right * (run ? runSpeed : speed) * 10 * Input.GetAxis("Horizontal") * Time.deltaTime) + (transform.right * (run ? runSpeed : speed) * 5 * Input.GetAxis("Horizontal") * Time.deltaTime) +
(transform.up * 10 * Time.deltaTime), (transform.up * 10 * Time.deltaTime),
ForceMode.VelocityChange ForceMode.VelocityChange
); );
@ -344,7 +375,7 @@ public class PlayerManager : MonoBehaviour
} }
if (other.gameObject.GetComponent<PowerCubeManager>() != null) if (other.gameObject.GetComponent<PowerCubeManager>() != null)
{ {
interact = true; interact = false;
} }
} }

View File

@ -5,7 +5,7 @@ using UnityEngine.SceneManagement;
public class PowerCubeManager : MonoBehaviour public class PowerCubeManager : MonoBehaviour
{ {
public enum PowerType {Nothing, Bigger, Faster, Jumper, Artefact}; public enum PowerType {Nothing, Bigger, Faster, Jumper, Artefact, DubleJump, PushPull, Dash};
public PowerType powerType = PowerType.Nothing; public PowerType powerType = PowerType.Nothing;
public float powerTime = 5f; public float powerTime = 5f;
public float powerUnit = 10f; public float powerUnit = 10f;
@ -25,7 +25,7 @@ public class PowerCubeManager : MonoBehaviour
{ {
GetComponentInChildren<MeshRenderer>().material.color = Color.green; GetComponentInChildren<MeshRenderer>().material.color = Color.green;
} }
else if (powerType == PowerType.Artefact) else if (powerType == PowerType.Artefact || powerType == PowerType.DubleJump || powerType == PowerType.PushPull || powerType == PowerType.Dash)
{ {
meshRenderer = GetComponentInChildren<MeshRenderer>(); meshRenderer = GetComponentInChildren<MeshRenderer>();
meshRenderer.materials[1].SetFloat("_Outline", 0.0f); meshRenderer.materials[1].SetFloat("_Outline", 0.0f);
@ -43,14 +43,24 @@ public class PowerCubeManager : MonoBehaviour
{ {
if (other.gameObject.tag == "Player") if (other.gameObject.tag == "Player")
{ {
meshRenderer.materials[1].SetFloat("_Outline", 0.4f); if (powerType == PowerType.Artefact)
{
meshRenderer.materials[1].SetFloat("_Outline", 0.4f);
}
else if (powerType == PowerType.DubleJump || powerType == PowerType.PushPull || powerType == PowerType.Dash)
{
meshRenderer.materials[1].SetFloat("_Outline", 0.01f);
}
} }
} }
private void OnTriggerExit(Collider other) private void OnTriggerExit(Collider other)
{ {
if (other.gameObject.tag == "Player") if (other.gameObject.tag == "Player")
{ {
meshRenderer.materials[1].SetFloat("_Outline", 0.0f); if (powerType == PowerType.Artefact || powerType == PowerType.DubleJump || powerType == PowerType.PushPull || powerType == PowerType.Dash)
{
meshRenderer.materials[1].SetFloat("_Outline", 0.0f);
}
} }
} }
} }