public void ResetCurrentLevel() { _level = null; ResetTargets(); SceneManager.LoadScene(SceneManager.GetActiveScene().name); Time.timeScale = 1f; }
void Start() { // Se obtiene la referencia a SKLevel, que administra el nivel actual _level = SKGameControl.instance.levelmanager; this.gameObject.transform.parent.name = "Ground"; this.gameObject.name = "Box"; this.gameObject.transform.parent = null; }
public void RestartGame() { _level = null; ResetTargets(); _characterMoves = 0; _activePlayTime = 0; SceneManager.LoadScene(SceneManager.GetActiveScene().name); }
// Método que se ejecuta únicamente en el primer momento que aparece en pantalla el objeto void Start() { // Se obtiene la referencia a SKLevel, que administra el nivel actual _level = SKGameControl.instance.levelmanager; _isReadyToMove = true; this.gameObject.transform.parent.name = "Ground"; this.gameObject.name = "Player"; this.gameObject.transform.parent = null; _smoothFollow = Camera.main.GetComponent <SKSmoothFollow>(); _smoothFollow.target = this.gameObject.transform; }
public void SetLevelController(SKLevel level) { _level = level; }
public void LoadScene(string value) { _level = null; ResetTargets(); SceneManager.LoadScene(value); }