private void InitActors() { _instance = this; _allActors = FindObjectsOfType <TileBasedMovement>().Where(x => x.tag == "Actor").ToList(); _currentActor = _allActors.First(); Camera.main.GetComponent <CameraFollow>().Follow(_currentActor.transform); }
public override void Execute(TileBasedMovement currentActor) { var inputHandler = GameObject.FindObjectOfType <InputHandler>(); if (inputHandler) { inputHandler.Switch(currentActor); } }
void Awake() { allActors = FindObjectsOfType <TileBasedMovement>().ToList(); InitKeyMap(); //add commands if (_currentActor) { _currentActor = allActors.First(); } }
public override void Execute(TileBasedMovement target) { InputRecorder.Instance.Record(); }
public abstract void Execute(TileBasedMovement target);
public override void Execute(TileBasedMovement target) { _command.Execute(target); }
public override void Execute(TileBasedMovement currentActor) { InputHandler.Instance.Switch(currentActor); }
public override void Execute(TileBasedMovement target) { target.Walk(target.transform.position + _direction); }
public override void Execute(TileBasedMovement target) { target.Walk(_direction); }
public void Switch(TileBasedMovement currentActor) { _currentActor = GetNextActor(); Camera.main.GetComponent <CameraFollow>().Follow(_currentActor.transform); }
//start/stop record public override void Execute(TileBasedMovement target) { Debug.Log("record command is pressed"); InputHandler.Instance.Record(); }