Пример #1
0
    public void Execute(GameObject actor)
    {
        Mover2D actorMover = actor.GetComponent <Mover2D>();

        if (actorMover != null)
        {
            actorMover.Move(moveDirection);
        }
        else
        {
            Debug.LogError("INVALID COMMAND called on " + actor.name + ", no Mover component found");
        }
    }