KochamMaslo

StatAllocationModule:

Sep 11th, 2016
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.96 KB | None | 0 0
  1. using UnityEngine;
  2. using System.Collections;
  3.  
  4. public class StatAllocationModule {
  5.  
  6.     private string[] statNames = new string[6] {"Stamina", "Wytrzymałość", "Intelekt", "Siła", "Zwinność", "Odporność"};
  7.     private string[] statDescriptions = new string[6] {"Modyfikator Życia", "Modyfikator Energii", "Modyfikator Siły Magicznej", "Modyfikator Siły Fizycznej", "Modyfikator Ciosów Krytycznych i Szybkości Ataku", "Modyfikator Odporności na Obrażenia"};
  8.     private bool[] statSelections = new bool[6];
  9.  
  10.     public void DisplayStatAllocationModule(){
  11.        
  12.         DisplayStatToggleSwithes();
  13.  
  14.     }
  15.  
  16.     private void DisplayStatToggleSwithes(){
  17.         for (int i = 0; i < statNames.Length; i++) {
  18.             statSelections [i] = GUI.Toggle (new Rect (10, 60 * i + 10, 100, 50), statSelections [i],  statNames [i]);
  19.         }
  20.     }
  21.  
  22.     private void DisplayStatDescriptions(bool[] statSelections) {
  23.         if (statSelections [0]) {
  24.             GUI.Label (new Rect (0, 0, 0, 0), statDescriptions [0]);
  25.         }
  26.     }
  27. }
Add Comment
Please, Sign In to add comment