Change some prefabs platform and player reaction
This commit is contained in:
@@ -4,7 +4,7 @@ using UnityEngine;
|
||||
|
||||
public class PlatformManager : MonoBehaviour
|
||||
{
|
||||
public enum PlatformType {Pull, Push, RotateZ, RotateY, SpeedUp, SpeedDown};
|
||||
public enum PlatformType {Basic, Pull, Push, RotateZ, RotateY, SpeedUp, SpeedDown};
|
||||
public PlatformType type = PlatformType.Pull;
|
||||
public float speed = 5;
|
||||
|
||||
|
@@ -178,8 +178,10 @@ public class PlayerController : MonoBehaviour
|
||||
switch (platform.type)
|
||||
{
|
||||
case PlatformManager.PlatformType.Push:
|
||||
rb.AddExplosionForce(platform.speed * Time.deltaTime * 10, other.gameObject.transform.position, 10);
|
||||
break;
|
||||
case PlatformManager.PlatformType.Pull:
|
||||
rb.AddExplosionForce(-platform.speed * Time.deltaTime * 10, other.gameObject.transform.position, 10);
|
||||
break;
|
||||
case PlatformManager.PlatformType.RotateY:
|
||||
break;
|
||||
|
Reference in New Issue
Block a user