Exemplo n.º 1
0
        public void ClickEnd()
        {
            IWorldCommand cmd    = currentMode.ClickEnd(Input.mousePosition);
            IWorldCommand invCmd = cmd.Excecute();

            inverseCommands.Push(invCmd);
        }
Exemplo n.º 2
0
        public IWorldCommand ClickEnd(Vector2 mousePosition)
        {
            if (!validClickStart)
            {
                return(NullCommand.instance);
            }

            IWorldCommand action = GetActionCommand(mousePosition);

            validClickStart = false;

            return(action);
        }
Exemplo n.º 3
0
        public override IWorldCommand Excecute()
        {
            List <IWorldCommand> inverseCommands = new List <IWorldCommand> ();

            foreach (IWorldCommand cmd  in commands)
            {
                IWorldCommand inverseCmd = cmd.Excecute();
                if (inverseCmd != NullCommand.instance)
                {
                    inverseCommands.Add(inverseCmd);
                }
            }

            if (inverseCommands.Count == 0)
            {
                return(NullCommand.instance);
            }

            return(new CompositeCommand(level, inverseCommands));
        }