Class to represent the player's inventory for single player
Inheritance: PlayerInventory
Ejemplo n.º 1
0
 public void getCookie()
 {
     GameObject gb = new GameObject("CookieText");
     UnityEngine.UI.Text st = gb.AddComponent<UnityEngine.UI.Text>();
     st.text = "Cookie:";
     PlayerInventorySingle pi = new PlayerInventorySingle();
     pi.ResetCookie();
     pi.IncreaseCookieCount(); //check increase initially willl get 1 cookies
     Assert.That(pi.GetCookieCount() == 1);
     pi.IncreaseCookieCount(); //check increase again will +1 and not reset
     Assert.That(pi.GetCookieCount() == 2);
 }
Ejemplo n.º 2
0
 public void getKey()
 {
     PlayerInventorySingle pi = new PlayerInventorySingle();
     pi.GotKey(1);
     Assert.That(pi.HasKey(1));//check after getting key inventory updates
 }
Ejemplo n.º 3
0
 public void checkNoKey()
 {
     PlayerInventorySingle pi = new PlayerInventorySingle();
     Assert.That(pi.HasKey(2) == false);//check dont have key will say inventory dont have
 }