public void StartCombat(PlayerExplorationController player, string desiredLevel) { if (!level) { level = GameManager.Singleton.CreateCombat("Level/" + desiredLevel); } level.enemyProxy = this; players.Add(player); level.SpawnPlayer(player.PlayerID); }
private void LoadPlayer(int id) { Player.CreatePlayer(id, 3, 1, 1, 1); PlayerExplorationController explorationController = Instantiate(ResourceUtility.GetPrefab <PlayerExplorationController>("PlayerE")); explorationController.Initialize(id); playerExplorationControllers[id] = explorationController; PlayerCombatController combatController = Instantiate(ResourceUtility.GetPrefab <PlayerCombatController>("PlayerCombat")); combatController.Initialize(id); playerCombatControllers[id] = combatController; }
public bool StartDialog(PlayerExplorationController player) { if (currentDialogIndex > 0) { currentDialogIndex = 0; alternative = true; return(false); } Debug.Log(player.name + " started dialog."); currentDialogIndex = 0; playerInTalking = player; active = true; DialogueBox.instance.Show(); DialogueBox.instance.Text = alternative ? alternativeDialogues[0] : dialogues[0]; emitter.Play(); return(true); }
public void StartCombat(PlayerExplorationController player, bool isBoss) { if (!level) { if (isBoss) { level = GameManager.Singleton.CreateCombat("Level/BossLevel"); } else { level = GameManager.Singleton.CreateCombat("Level/NormalLevel"); } } level.enemyProxy = this; players.Add(player); level.SpawnPlayer(player.PlayerID); }
private void LoadPlayer(int id, PlayerClass playerClass) { switch (playerClass) { case PlayerClass.Knight: { Player.CreatePlayer(id, 3, 1, 1, 1); PlayerExplorationController explorationController = Instantiate(ResourceUtility.GetPrefab <PlayerExplorationController>("KnightE")); explorationController.Initialize(id); playerExplorationControllers[id] = explorationController; PlayerCombatController combatController = Instantiate(ResourceUtility.GetPrefab <PlayerCombatController>("KnightC")); combatController.Initialize(id); playerCombatControllers[id] = combatController; } break; case PlayerClass.Heavy: { Player.CreatePlayer(id, 6, 2, 1, 1); PlayerExplorationController explorationController = Instantiate(ResourceUtility.GetPrefab <PlayerExplorationController>("HeavyE")); explorationController.Initialize(id); playerExplorationControllers[id] = explorationController; PlayerCombatController combatController = Instantiate(ResourceUtility.GetPrefab <PlayerCombatController>("HeavyC")); combatController.Initialize(id); playerCombatControllers[id] = combatController; } break; case PlayerClass.Nurse: { Player.CreatePlayer(id, 2, 1, 1, 1); PlayerExplorationController explorationController = Instantiate(ResourceUtility.GetPrefab <PlayerExplorationController>("NurseE")); explorationController.Initialize(id); playerExplorationControllers[id] = explorationController; PlayerCombatController combatController = Instantiate(ResourceUtility.GetPrefab <PlayerCombatController>("NurseC")); combatController.Initialize(id); playerCombatControllers[id] = combatController; } break; } }