Edit bigger power
This commit is contained in:
parent
93432545e9
commit
a62bd37ef2
@ -121,6 +121,80 @@ NavMeshSettings:
|
||||
debug:
|
||||
m_Flags: 0
|
||||
m_NavMeshData: {fileID: 0}
|
||||
--- !u!1001 &91642793
|
||||
PrefabInstance:
|
||||
m_ObjectHideFlags: 0
|
||||
serializedVersion: 2
|
||||
m_Modification:
|
||||
m_TransformParent: {fileID: 0}
|
||||
m_Modifications:
|
||||
- target: {fileID: 3881240002875110222, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: powerUnit
|
||||
value: 0.5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8426673075699058389, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_Name
|
||||
value: SkillCube
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.x
|
||||
value: 8.49
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.y
|
||||
value: 2.11
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalPosition.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.w
|
||||
value: 1
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalRotation.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.x
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.y
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 9203772316689128559, guid: a81c7869040fbef4f8d5acf2c1499c42,
|
||||
type: 3}
|
||||
propertyPath: m_LocalEulerAnglesHint.z
|
||||
value: 0
|
||||
objectReference: {fileID: 0}
|
||||
m_RemovedComponents: []
|
||||
m_SourcePrefab: {fileID: 100100000, guid: a81c7869040fbef4f8d5acf2c1499c42, type: 3}
|
||||
--- !u!1 &253619331
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@ -229,7 +303,7 @@ PrefabInstance:
|
||||
- target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 4
|
||||
value: 5
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
|
||||
type: 3}
|
||||
@ -298,7 +372,7 @@ PrefabInstance:
|
||||
- target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 5
|
||||
value: 6
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7120608647080996506, guid: 597897b562955934fae65d62e0a8e3cd,
|
||||
type: 3}
|
||||
@ -448,7 +522,7 @@ Transform:
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_Children: []
|
||||
m_Father: {fileID: 0}
|
||||
m_RootOrder: 2
|
||||
m_RootOrder: 4
|
||||
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
|
||||
--- !u!1001 &2549885454013026912
|
||||
PrefabInstance:
|
||||
@ -460,7 +534,7 @@ PrefabInstance:
|
||||
- target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 8
|
||||
value: 9
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 1593063039033634447, guid: 2d077f1b027540045b6833e51a067855,
|
||||
type: 3}
|
||||
@ -534,7 +608,7 @@ PrefabInstance:
|
||||
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 6
|
||||
value: 7
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 8833996703784759035, guid: 3ddcad8db762bdf41b5b49fff6fb6a3b,
|
||||
type: 3}
|
||||
@ -603,7 +677,7 @@ PrefabInstance:
|
||||
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 7
|
||||
value: 8
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 6695479724104099607, guid: 94642d7ef8c97e544af1d5ca3596a37f,
|
||||
type: 3}
|
||||
@ -672,7 +746,7 @@ PrefabInstance:
|
||||
- target: {fileID: 5189304429820737636, guid: c6f393d12d7dd6b43a2ec2840cb89b97,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 9
|
||||
value: 10
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 5189304429820737636, guid: c6f393d12d7dd6b43a2ec2840cb89b97,
|
||||
type: 3}
|
||||
@ -746,7 +820,7 @@ PrefabInstance:
|
||||
- target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
|
||||
type: 3}
|
||||
propertyPath: m_RootOrder
|
||||
value: 1
|
||||
value: 2
|
||||
objectReference: {fileID: 0}
|
||||
- target: {fileID: 7094923891560833917, guid: e4d82994b58b7304b91c915c597b71f8,
|
||||
type: 3}
|
||||
|
@ -48,8 +48,8 @@ public class PlayerManager : MonoBehaviour
|
||||
saveSpeed = speed;
|
||||
saveRunSpeed = runSpeed;
|
||||
saveJump = jump;
|
||||
saveSize = playerAnimator.transform.localScale;
|
||||
savePosition = playerAnimator.transform.localPosition;
|
||||
saveSize = transform.localScale;
|
||||
savePosition = transform.localPosition;
|
||||
saveCameraPosition = Camera.main.transform.localPosition;
|
||||
}
|
||||
|
||||
@ -60,7 +60,7 @@ public class PlayerManager : MonoBehaviour
|
||||
{
|
||||
Application.Quit(0);
|
||||
}
|
||||
if (actualHealth <= 0)
|
||||
if (actualHealth <= 0 || gameObject.transform.position.y < -400.0f)
|
||||
{
|
||||
playerAnimator.Play("Die");
|
||||
}
|
||||
@ -88,7 +88,9 @@ public class PlayerManager : MonoBehaviour
|
||||
if (startEating)
|
||||
{
|
||||
float stepSmaller = 0.8f * Time.deltaTime;
|
||||
powerCubeManager.transform.localScale = Vector3.Slerp(powerCubeManager.transform.localScale, new Vector3(0.01f, 0.01f, 0.01f), stepSmaller);
|
||||
if (powerCubeManager != null) {
|
||||
powerCubeManager.transform.localScale = Vector3.Slerp(powerCubeManager.transform.localScale, new Vector3(0.01f, 0.01f, 0.01f), stepSmaller);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -285,19 +287,19 @@ public class PlayerManager : MonoBehaviour
|
||||
actualPowerTimes[powerType.GetHashCode() - 1] = Time.time + powerTime;
|
||||
if (powerType == PowerCubeManager.PowerType.Bigger)
|
||||
{
|
||||
saveSize = playerAnimator.transform.localScale;
|
||||
savePosition = playerAnimator.transform.localPosition;
|
||||
saveSize = transform.localScale;
|
||||
savePosition = transform.localPosition;
|
||||
saveCameraPosition = Camera.main.transform.localPosition;
|
||||
|
||||
playerAnimator.transform.localScale = new Vector3(
|
||||
playerAnimator.transform.localScale.x + power,
|
||||
playerAnimator.transform.localScale.y + power,
|
||||
playerAnimator.transform.localScale.z + power
|
||||
transform.localScale = new Vector3(
|
||||
transform.localScale.x + power,
|
||||
transform.localScale.y + power,
|
||||
transform.localScale.z + power
|
||||
);
|
||||
playerAnimator.transform.localPosition = new Vector3(
|
||||
playerAnimator.transform.localPosition.x,
|
||||
playerAnimator.transform.localPosition.y + power * 2,
|
||||
playerAnimator.transform.localPosition.z
|
||||
transform.localPosition = new Vector3(
|
||||
transform.localPosition.x,
|
||||
transform.localPosition.y + power * 2,
|
||||
transform.localPosition.z
|
||||
);
|
||||
Camera.main.transform.localPosition = new Vector3(
|
||||
Camera.main.transform.localPosition.x,
|
||||
@ -327,8 +329,8 @@ public class PlayerManager : MonoBehaviour
|
||||
{
|
||||
if (actualPowerTimes[0] != 0f && actualPowerTimes[0] < Time.time)
|
||||
{
|
||||
playerAnimator.transform.localScale = saveSize;
|
||||
playerAnimator.transform.localPosition = savePosition;
|
||||
transform.localScale = saveSize;
|
||||
transform.localPosition = savePosition;
|
||||
Camera.main.transform.localPosition = saveCameraPosition;
|
||||
actualPowerTimes[0] = 0f;
|
||||
}
|
||||
|
@ -14,6 +14,18 @@ public class PowerCubeManager : MonoBehaviour
|
||||
|
||||
void Start()
|
||||
{
|
||||
if (powerType == PowerType.DubleJump)
|
||||
{
|
||||
GetComponentInChildren<MeshRenderer>().material.color = Color.cyan;
|
||||
}
|
||||
if (powerType == PowerType.PushPull)
|
||||
{
|
||||
GetComponentInChildren<MeshRenderer>().material.color = Color.yellow;
|
||||
}
|
||||
if (powerType == PowerType.Dash)
|
||||
{
|
||||
GetComponentInChildren<MeshRenderer>().material.color = Color.white;
|
||||
}
|
||||
if (powerType == PowerType.Bigger) {
|
||||
GetComponentInChildren<MeshRenderer>().material.color = Color.blue;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user