public void SetUpInputController(PlayerControllerView player, FloatingJoystick JoyStick, Button fire_Bomb) { if (this.fire_Bomb == null) { this.fire_Bomb = fire_Bomb; this.fire_Bomb.onClick.AddListener(FireBomb); } this.JoyStick = JoyStick; this.player = player; }
void SpawnPlayer() { player = Instantiate(playerPrefab.gameObject, mapManager.GetSpawnPoint(), Quaternion.identity).GetComponent <PlayerControllerView>(); player.SetBombManager(bombManager); inputController.SetUpInputController(player, joyStick, fireBomb); }
private void Reset() { player = null; }