示例#1
0
        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);
            }
        }
示例#2
0
        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);
            }
        }
示例#3
0
        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);
            }
        }
示例#4
0
        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);
        }