Ejemplo n.º 1
0
    // Use this for initialization
    void Start()
    {
        data = DataScript.data; //loads the data script
          targetArmy = data.armyData; //loads the army data
          player = data.playerData; //loads the player data

          int targetArmySize = targetArmy.GetArmySize(); //number of party members in player's party

          targetArray = new GameObject[targetArmySize + 1]; //create an array of targets including the player

          //set elements of the target array to player and party
          for (int i = 0; i < targetArmySize; i++) {

        //targetArray[i] = targetArmy.partySoldiers[i];

          }

          //set the final element to the player
          targetArray[targetArray.Length - 1] = player.getPlayerObject();
    }
Ejemplo n.º 2
0
 void Start()
 {
     armyData = DataScript.data.armyData; //sets the army data
 }
 /* Sets the static variable armyData to this instance of the script */
 void Start()
 {
     armyData = this;
 }
    void Start()
    {
        data = DataScript.data; //sets the data variable
        armyData = ArmyDataScript.armyData; //sets the armyData variable

        /* Sets a null button */
        nullButton.buttonRect = new Rect(0,0,0,0);
        nullButton.soldierIndex = -1;

        //creates an array of party buttons
        partyButtonsArray = new soldierButton[ArmyDataScript.partyCap];

        //creates an array of army buttons that will be displayed
        armyButtonsArray = new soldierButton[ArmyDataScript.armyCap];
    }