public override void Begin(InstructionContext context) { var target = context.GetObject <GameObject>(Target); if (target != null) { Destroy(target); } else { Debug.LogFormat("unable to find the object {0} to destroy", Target.Name); } }
public override void Begin(InstructionContext context) { var target = context.GetObject <MoveController>(Target); if (target != null) { target.Freeze(); } else { Debug.LogFormat("unable to find the controller {0} to freeze", Target.Name); } }
public override void Begin(InstructionContext context) { var target = context.GetObject <MoveController>(Target); if (target != null) { _move = target.StartCoroutine(Move(target)); } else { Debug.LogFormat("unable to find the object {0} to move", Target.Name); } }
public override void Begin(InstructionContext context) { var trainers = new List <Trainer>(); foreach (var variable in Trainers) { var trainer = context.GetObject <Trainer>(variable); if (trainer != null) { trainers.Add(trainer); } } _data = BattleManager.Instance.StartBattle(Battle, trainers); }