public override void Trigger(GameObject Actor) { if (Actor != null) { levController = Actor.GetComponent <LevController>(); if (levController == null) { Debug.LogError("Actor is does not have Lev Controller"); return; } switch (direction) { case LevController.Direction.Left: levController.moveLeft(); break; case LevController.Direction.Right: levController.moveRight(); break; } } }
public override void UpdateTime(GameObject Actor, float time, float deltaTime) { if (Actor != null) { levController = Actor.GetComponent <LevController>(); if (levController == null) { Debug.LogError("Actor is does not have Lev Controller"); return; } originAcceleration = levController.levSetting.runAcceleration; switch (direction) { case LevController.Direction.Left: levController.moveLeft(); break; case LevController.Direction.Right: levController.moveRight(); break; } } }