Ejemplo n.º 1
0
 void charaktererstellung(Rect ErsteZeile)
 {
     if (p001 != null)
     {
         p001 = GameObject.Find("Main Camera").GetComponent <player> ();
     }
     GUI.Label(ErsteZeile, "Choose your Class:");
     ErsteZeile.position = new Vector2(ErsteZeile.position.x, ErsteZeile.position.y + ErsteZeile.height);
     if (GUI.Button(new Rect(ErsteZeile), "Melee"))
     {
         diff_armor   = 7;
         diff_agility = 2;
         diff_pwr     = 7;
         diff_MaxHP  += 250;
         diff_HP      = diff_MaxHP;
         p001.Beginn(diff_HP, diff_MaxHP, diff_MP, diff_MaxMP, diff_xp, start_lvl, diff_gold, diff_pwr, diff_armor, diff_agility, loginname, 80, 80, Player_ID);
         step = 4;
     }
     ErsteZeile.position = new Vector2(ErsteZeile.position.x, ErsteZeile.position.y + ErsteZeile.height);
     if (GUI.Button(new Rect(ErsteZeile), "Range"))
     {
         diff_armor   = 7;
         diff_agility = 7;
         diff_pwr     = 5;
         p001.Beginn(diff_HP, diff_MaxHP, diff_MP, diff_MaxMP, diff_xp, start_lvl, diff_gold, diff_pwr, diff_armor, diff_agility, loginname, 80, 80, Player_ID);
         step = 4;
     }
     ErsteZeile.position = new Vector2(ErsteZeile.position.x, ErsteZeile.position.y + ErsteZeile.height);
     if (GUI.Button(new Rect(ErsteZeile), "Mage"))
     {
         diff_armor   = 2;
         diff_agility = 5;
         diff_pwr     = 5;
         diff_MaxMP  += 200;
         diff_MP      = diff_MaxMP;
         p001.Beginn(diff_HP, diff_MaxHP, diff_MP, diff_MaxMP, diff_xp, start_lvl, diff_gold, diff_pwr, diff_armor, diff_agility, loginname, 80, 80, Player_ID);
         step = 4;
     }
     ErsteZeile.position = new Vector2(ErsteZeile.position.x, ErsteZeile.position.y + ErsteZeile.height);
     //return p001;
 }