Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using UnityEngine;
- using System.Collections;
- public class DisplayCreatePlayerFunctions {
- private StatAllocationModule statAllocationModule = new StatAllocationModule();
- private int classSelection;
- private string[] classSelectionNames = new string[] {"Mag", "Wojownik", "Łotrzyk", "Łucznik", "Czarodziej", "Paladyn"};
- public void DisplayClassSelections(){
- //A list of toggle buttons and each button will be a different class
- //selection grid
- classSelection = GUI.SelectionGrid(new Rect(50,50,250,300), classSelection, classSelectionNames, 2);
- GUI.Label (new Rect (450, 50, 300, 300), FindClassDescription (classSelection));
- GUI.Label (new Rect (450, 100, 300, 300), FindClassStatValues (classSelection));
- }
- private string FindClassDescription(int classSelection){
- if (classSelection == 0) {
- BaseCharacterClass tempClass = new BaseMageClass ();
- return tempClass.CharacterClassDescription;
- } else if (classSelection == 1) {
- BaseCharacterClass tempClass = new BaseWarriorClass ();
- return tempClass.CharacterClassDescription;
- } else if (classSelection == 2) {
- BaseCharacterClass tempClass = new BaseRogueClass ();
- return tempClass.CharacterClassDescription;
- } else if (classSelection == 3) {
- BaseCharacterClass tempClass = new BaseArcherClass ();
- return tempClass.CharacterClassDescription;
- } else if (classSelection == 4) {
- BaseCharacterClass tempClass = new BaseWarlockClass ();
- return tempClass.CharacterClassDescription;
- } else if (classSelection == 5) {
- BaseCharacterClass tempClass = new BasePaladinClass ();
- return tempClass.CharacterClassDescription;
- }
- return "NIE ZNALEZIONO KLASY.";
- }
- private string FindClassStatValues(int classSelection){
- if (classSelection == 0) {
- BaseCharacterClass tempClass = new BaseMageClass ();
- string tempStats = "Stamina " + tempClass.Stamina + "\n," + "Wytrzymałość " + tempClass.Endurance + "\n" + "Intelekt " + tempClass.Intellect + "\n" + "Siła " + tempClass.Strength + "\n" + "Zwinność " + tempClass.Agility + "\n" + "Odporność " + tempClass.Resistance;
- return tempStats;
- } else if (classSelection == 1) {
- BaseCharacterClass tempClass = new BaseWarriorClass ();
- string tempStats = "Stamina " + tempClass.Stamina + "\n," + "Wytrzymałość " + tempClass.Endurance + "\n" + "Intelekt " + tempClass.Intellect + "\n" + "Siła " + tempClass.Strength + "\n" + "Zwinność " + tempClass.Agility + "\n" + "Odporność " + tempClass.Resistance;
- return tempStats;
- } else if (classSelection == 2) {
- BaseCharacterClass tempClass = new BaseRogueClass ();
- string tempStats = "Stamina " + tempClass.Stamina + "\n," + "Wytrzymałość " + tempClass.Endurance + "\n" + "Intelekt " + tempClass.Intellect + "\n" + "Siła " + tempClass.Strength + "\n" + "Zwinność " + tempClass.Agility + "\n" + "Odporność " + tempClass.Resistance;
- return tempStats;
- } else if (classSelection == 3) {
- BaseCharacterClass tempClass = new BaseArcherClass ();
- string tempStats = "Stamina " + tempClass.Stamina + "\n," + "Wytrzymałość " + tempClass.Endurance + "\n" + "Intelekt " + tempClass.Intellect + "\n" + "Siła " + tempClass.Strength + "\n" + "Zwinność " + tempClass.Agility + "\n" + "Odporność " + tempClass.Resistance;
- return tempStats;
- } else if (classSelection == 4) {
- BaseCharacterClass tempClass = new BaseWarlockClass ();
- string tempStats = "Stamina " + tempClass.Stamina + "\n," + "Wytrzymałość " + tempClass.Endurance + "\n" + "Intelekt " + tempClass.Intellect + "\n" + "Siła " + tempClass.Strength + "\n" + "Zwinność " + tempClass.Agility + "\n" + "Odporność " + tempClass.Resistance;
- return tempStats;
- } else if (classSelection == 5) {
- BaseCharacterClass tempClass = new BasePaladinClass ();
- string tempStats = "Stamina " + tempClass.Stamina + "\n," + "Wytrzymałość " + tempClass.Endurance + "\n" + "Intelekt " + tempClass.Intellect + "\n" + "Siła " + tempClass.Strength + "\n" + "Zwinność " + tempClass.Agility + "\n" + "Odporność " + tempClass.Resistance;
- return tempStats;
- }
- return "NIE ZNALEZIONO STATYSTYKI.";
- }
- public void DisplayStatAllocation(){
- //a list of stats with plus and minus buttons to add stats
- //logic to make sure the player cannot add more than stats given
- statAllocationModule.DisplayStatAllocationModule();
- }
- public void DisplayFinalSetup(){
- //name
- //add a description to your character, a shor bio
- }
- public void DisplayMainItems(){
- Transform player = GameObject.FindGameObjectWithTag ("Player").transform;
- GUI.Label(new Rect(Screen.width/2, 20, 250, 250), "STWÓRZ POSTAĆ");
- if (GUI.RepeatButton (new Rect (450, 400, 50, 50), "<<<")) {
- //turn transform tagged as player to the left
- player.Rotate(Vector3.up);
- }
- if (GUI.RepeatButton (new Rect (800, 400, 50, 50), ">>>")) {
- //turn transform tagged as player to the right
- player.Rotate(Vector3.down);
- }
- }
- }
Add Comment
Please, Sign In to add comment