Beispiel #1
0
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.Tab))
     {
         menu.Toggle();
     }
     if (!player || !menu.Visible())
     {
         return;
     }
     txt.text =
         "[Lv." + player.level + "]\n\n" +
         player.strength + "\n\n" +
         player.dexterity + "\n\n" +
         player.vitality + "\n\n" +
         player.energy + "\n\n" +
         "nan" + "\n\n" +              //armor
         player.availableStatsPoints + "\n\n\n\n" +
         // player.currentDamage + "\n\n" +
         (long)player.weaponAttackMin + "-" + (long)player.weaponAttackMax + "\n\n" +
         player.currentWeaponPeriod + "\n\n" +
         (long)((player.weaponAttackMin + player.weaponAttackMax) / player.currentWeaponPeriod * 0.5f) + "\n\n" +
         player.maxHealth + "\n\n" +
         player.currentExperience + "\n\n" +
         player.requiredExperience;
 }
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.N))
     {
         menu.Toggle();
     }
     if (!player || !menu.Visible())
     {
         return;
     }
 }
 void Update()
 {
     if (Input.GetKeyDown(KeyCode.I))
     {
         menu.Toggle();
     }
     if (!player || !menu.Visible())
     {
         return;
     }
     if (player.inventoryChanged)
     {
         UpdateInv();
         player.inventoryChanged = false;
     }
 }