Esempio n. 1
0
 // Use this for initialization
 void Start()
 {
     BattleFieldManager.calculateSize(GetComponent <Camera>());
     daysWon   = 0;
     gameState = TITLE;
     startGameButton.onClick.AddListener(EnterTown);
     runButton.onClick.AddListener(runCode);
     runButton.gameObject.SetActive(false);
     inventory = new FunctionBullet[24];
     for (int i = 0; i < 24; i++)
     {
         if (i < 6)
         {
             inventory[i] = new FunctionBullet(FunctionBullet.FIRE);
         }
         else if (i < 8)
         {
             inventory[i] = new FunctionBullet(FunctionBullet.ROLL_FORWARD);
         }
         else if (i < 10)
         {
             inventory[i] = new FunctionBullet(FunctionBullet.ROLL_BACKWARD);
         }
         else if (i < 14)
         {
             inventory[i] = new FunctionBullet(FunctionBullet.TURN_TO_NEAREST_ENEMY);
         }
         else if (i < 18)
         {
             inventory[i] = new FunctionBullet(FunctionBullet.TURN_TO_NEAREST_LOOT);
         }
         else
         {
             inventory[i] = new FunctionBullet(FunctionBullet.DO_NOTHING);
         }
     }
     currentHand = new FunctionBullet[6];
     functionUI  = new GameObject[6];
     alpha       = Instantiate(alpha, new Vector3(100, 100, 0f), new Quaternion());
 }