Example #1
0
 // 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);
 }
Example #3
0
 // 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);
 }
Example #4
0
 // 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);
 }
Example #6
0
 void Awake()
 {
     if (instance == null)
     {
         //...set this one to be it...
         instance = this;
     }
     //...otherwise...
     else if (instance != this)
     {
         //...destroy this one because it is a duplicate.
         Destroy(gameObject);
     }
 }
Example #7
0
 // 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);
 }
 // 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 !");
 }
 public void SetParentPanel(EventPanelScript panel)
 {
     _parentPanel = panel;
 }