public void ResetToStartingPos() { transform.GetChild(0).transform.localScale = Vector3.one; transform.GetChild(0).transform.rotation = Quaternion.Euler(Vector3.zero); transform.GetChild(0).transform.localPosition = Vector3.zero; transform.position = Starting_position; maze_mover.SetNewDirection(Vector2.zero); maze_mover.ResetTarget(); }
/// <summary> /// Reset player to the starting position and remove any target or movement. /// </summary> public void ResetPlayer() { transform.GetChild(0).transform.localScale = Vector3.one; transform.GetChild(0).transform.rotation = Quaternion.Euler(Vector3.zero); transform.GetChild(0).transform.localPosition = Vector3.zero; transform.position = GameManager.player_start_position; mazeMover.SetNewDirection(Vector2.zero); mazeMover.ResetTarget(); }