示例#1
0
        private void InitActors()
        {
            _instance = this;

            _allActors    = FindObjectsOfType <TileBasedMovement>().Where(x => x.tag == "Actor").ToList();
            _currentActor = _allActors.First();
            Camera.main.GetComponent <CameraFollow>().Follow(_currentActor.transform);
        }
示例#2
0
        public override void Execute(TileBasedMovement currentActor)
        {
            var inputHandler = GameObject.FindObjectOfType <InputHandler>();

            if (inputHandler)
            {
                inputHandler.Switch(currentActor);
            }
        }
示例#3
0
        void Awake()
        {
            allActors = FindObjectsOfType <TileBasedMovement>().ToList();
            InitKeyMap(); //add commands

            if (_currentActor)
            {
                _currentActor = allActors.First();
            }
        }
示例#4
0
 public override void Execute(TileBasedMovement target)
 {
     InputRecorder.Instance.Record();
 }
示例#5
0
 public abstract void Execute(TileBasedMovement target);
示例#6
0
 public override void Execute(TileBasedMovement target)
 {
     _command.Execute(target);
 }
示例#7
0
 public override void Execute(TileBasedMovement currentActor)
 {
     InputHandler.Instance.Switch(currentActor);
 }
示例#8
0
 public override void Execute(TileBasedMovement target)
 {
     target.Walk(target.transform.position + _direction);
 }
示例#9
0
 public override void Execute(TileBasedMovement target)
 {
     target.Walk(_direction);
 }
示例#10
0
 public void Switch(TileBasedMovement currentActor)
 {
     _currentActor = GetNextActor();
     Camera.main.GetComponent <CameraFollow>().Follow(_currentActor.transform);
 }
示例#11
0
 //start/stop record
 public override void Execute(TileBasedMovement target)
 {
     Debug.Log("record command is pressed");
     InputHandler.Instance.Record();
 }