コード例 #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 !");
 }
コード例 #2
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);
 }
コード例 #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);
 }
コード例 #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);
 }
コード例 #5
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);
 }
コード例 #6
0
ファイル: EventPanelScript.cs プロジェクト: haydon19/OTiS
 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);
     }
 }
コード例 #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);
 }
コード例 #8
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);
 }
コード例 #9
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 !");
 }
 public void SetParentPanel(EventPanelScript panel)
 {
     _parentPanel = panel;
 }