public void DoSomothing(int index) { ClearChoices(); if (index == 0) { evntPanelScr.SetDesc("You only find some food to gather"); food = Random.Range(1, 6); /**/ InstanciateReward(golds, food, cannonball, weaponID); InstanciateChoice(2, "Close"); } else if (index == 1) { evntPanelScr.SetDesc("You leave immediatly and continue your journey"); InstanciateChoice(-1, "Close"); } else if (index == 2) { evntPanelScr.ClaimReward(golds, food, cannonball, weaponID); evntPanelScr.CloseWindow(); } else if (index == -1) { evntPanelScr.CloseWindow(); } }
// Use this for initialization void Start() { evntPanelScr = GetComponent <EventPanelScript>(); evntPanelScr.SetTitle("Island in sight"); evntPanelScr.SetDesc("Captain,\n\n I see an island with a city, \n a ship is near the harbor.\n\n Should we get closer ? "); InstanciateChoice(0, "Yes"); InstanciateChoice(1, "No, leave immediatly !"); }
// Use this for initialization void Start() { evntPanelScr = GetComponent<EventPanelScript>(); evntPanelScr.ShipCamera(); evntPanelScr.SetTitle("A new journey begins"); evntPanelScr.SetDesc("Hi Captain.\n\nWe are ready to conquer the ocean !"); InstanciateChoice(-1, "Close"); //GameObject.FindGameObjectWithTag("Manager").GetComponent<ItemInventory>().AddItemToInventory(3); }
// Use this for initialization void Start() { evntPanelScr = GetComponent <EventPanelScript>(); evntPanelScr.ShipCamera(); evntPanelScr.SetTitle("A new journey begins"); evntPanelScr.SetDesc("Hi Captain.\n\nWe are ready to conquer the ocean !"); InstanciateChoice(-1, "Close"); //GameObject.FindGameObjectWithTag("Manager").GetComponent<ItemInventory>().AddItemToInventory(3); }
// Use this for initialization void Start() { evntPanelScr = GetComponent <EventPanelScript>(); evntPanelScr.ShipCamera(); evntPanelScr.SetTitle("Island in sight !"); evntPanelScr.SetDesc("It looks like a little forest-covered island ! \nShould we explore it ?"); InstanciateChoice(0, "Yes"); InstanciateChoice(1, "No"); //GameObject.FindGameObjectWithTag("Manager").GetComponent<ItemInventory>().AddItemToInventory(3); }
// Use this for initialization void Start() { evntPanelScr = GetComponent<EventPanelScript>(); evntPanelScr.ShipCamera(); evntPanelScr.SetTitle("Island in sight !"); evntPanelScr.SetDesc("It looks like a little forest-covered island ! \nShould we explore it ?"); InstanciateChoice(0, "Yes"); InstanciateChoice(1, "No"); //GameObject.FindGameObjectWithTag("Manager").GetComponent<ItemInventory>().AddItemToInventory(3); }
// Use this for initialization void Start() { evntPanelScr = GetComponent <EventPanelScript>(); eventManager = evntPanelScr.eventMng; golds = eventManager.goldReward; food = eventManager.foodReward; cannonball = eventManager.cannonballReward; if (eventManager.itemReward != null) { weaponID = eventManager.itemReward.itemID; } evntPanelScr.ShipCamera(); evntPanelScr.SetTitle("Enemy destroyed"); evntPanelScr.SetDesc("You destroyed your opponent and you collect some resources !"); InstanciateReward(golds, food, cannonball, weaponID); InstanciateChoice(0, "Close"); //GameObject.FindGameObjectWithTag("Manager").GetComponent<ItemInventory>().AddItemToInventory(3); }
// Use this for initialization void Start() { evntPanelScr = GetComponent<EventPanelScript>(); eventManager = evntPanelScr.eventMng; golds = eventManager.goldReward; food = eventManager.foodReward; cannonball = eventManager.cannonballReward; if(eventManager.itemReward != null) { weaponID = eventManager.itemReward.itemID; } evntPanelScr.ShipCamera(); evntPanelScr.SetTitle("Enemy destroyed"); evntPanelScr.SetDesc("You destroyed your opponent and you collect some resources !"); InstanciateReward(golds, food, cannonball, weaponID); InstanciateChoice(0, "Close"); //GameObject.FindGameObjectWithTag("Manager").GetComponent<ItemInventory>().AddItemToInventory(3); }
public void DoSomothing(int index) { ClearChoices(); if (index == 0) { int randomInt = Random.Range(0, 100); if (randomInt < 30) { evntPanelScr.BattleCamera(); evntPanelScr.SpawnEnemy(Ship.shipType.pirate); evntPanelScr.SetDesc("It's a pirate ship !\n They arm the cannons !"); InstanciateChoice(5, "Prepare to fight !"); InstanciateChoice(3, "Try to leave before they get closer."); } else { evntPanelScr.BattleCamera(); evntPanelScr.SpawnEnemy(Ship.shipType.standard); evntPanelScr.SetDesc("It looks like a merchant ship, they are leaving the island."); InstanciateChoice(5, "Attack the ship !"); InstanciateChoice(4, "Let it go and explore the city."); } } if (index == 1) { evntPanelScr.ShipCamera(); evntPanelScr.DispawnEnemy(); evntPanelScr.SetDesc("You leave immediatly and continue your journey"); InstanciateChoice(5, "Close"); } if (index == 2) { evntPanelScr.BattleCamera(); evntPanelScr.SpawnEnemy(Ship.shipType.pirate); evntPanelScr.SetDesc("Seeing you approach they prepare for battle"); InstanciateChoice(5, "Prepare to fight !"); } if (index == 3) { int randomInt = Random.Range(0, 100); if (randomInt < 30) { evntPanelScr.BattleCamera(); evntPanelScr.SpawnEnemy(Ship.shipType.pirate); evntPanelScr.SetDesc("They are too fast we can't escape !"); InstanciateChoice(5, "Arm the cannons !"); } else { evntPanelScr.ShipCamera(); evntPanelScr.DispawnEnemy(); evntPanelScr.SetDesc("You succeed to escape..."); InstanciateChoice(5, "Close"); } } if (index == 4) { evntPanelScr.ShipCamera(); evntPanelScr.DispawnEnemy(); //GetComponent<EventPanelScript>().eventTriggerManager.ShowShop(); evntPanelScr.CloseWindow(); } if (index == 5) { evntPanelScr.CloseWindow(); } }
// Use this for initialization void Start() { evntPanelScr = GetComponent<EventPanelScript>(); evntPanelScr.SetTitle("Island in sight"); evntPanelScr.SetDesc("Captain,\n\n I see an island with a city, \n a ship is near the harbor.\n\n Should we get closer ? "); InstanciateChoice(0, "Yes"); InstanciateChoice(1, "No, leave immediatly !"); }