IEnumerator WaitTimeMove(PositionMover _move) { yield return(new WaitForSeconds(_move.wait_time)); system.Next_turn(); _moves.Remove(_move); }
static void Main() { HelperIO.PrintDirection(); var table = HelperMapTable.CreateTableMap(); bool OK = true; while (OK) { HelperMapTable.PrintTableMap(table); PositionMover.Movement(table); } }
public void MoveCharacter(GameObject _character, Vector2 end_position, float speed, float _waitTime) { PositionMover new_move = new PositionMover(); new_move._character = _character; new_move.end_position = end_position; new_move.speed = speed; new_move.wait_time = _waitTime; _character.GetComponent <CharacterAnimation>().Move(); _moves.Add(new_move); if (_character.transform.position.x > end_position.x) { _character.GetComponent <CharacterAnimation>().Turn(true); } else { _character.GetComponent <CharacterAnimation>().Turn(false); } }