コード例 #1
0
    // Use this for initialization
    void Start()
    {
        gameManager = GameObject.Find("EventManager");                                       //Find the gameobject used to manage events

        sectors = GameObject.FindGameObjectsWithTag("Sector");                               //Find all gameobjects of sectors

        inputFieldObject = GameObject.Find("UnitsTextbox");                                  //Find the gameobject of the input field
        inputFieldText   = inputFieldObject.GetComponentInChildren <UnityEngine.UI.Text> (); //Find the text compontnt of the input field
        goButton         = GameObject.Find("GoButton");                                      //Find the gameobject of the submit button
        backButton       = GameObject.Find("BackButton");                                    //Find the gameobject of the submit button

        mode = 1;                                                                            //Set the mode to 1...where the attacking sector is picked (where units are moved from)

        inputFieldObject.SetActive(false);                                                   //Disable (and hide) the input field
        goButton.SetActive(false);                                                           //submit button
        backButton.SetActive(false);                                                         //and undo button

        gameInstructions.text = "Pick a sector to attack with...";                           //Set the game instructions to tell user next action they should take

        chanceCards = GameObject.Find("CardUI").GetComponent <ChanceCards>();
        assignUnits = this.gameObject.GetComponentInChildren <AssignUnits>();

        settingsButton   = GameObject.Find("SettingsButton").GetComponent <Button>();
        helpButton       = GameObject.Find("HelpButton").GetComponent <Button>();
        chanceCardButton = GameObject.Find("CardButton").GetComponent <Button>();

        minigame = GameObject.Find("Minigame");
        minigame.SetActive(false);
        minigameStatus = this.gameObject.GetComponent <MinigameStatus>();
    }
コード例 #2
0
 protected override void Read(CelesteNetBinaryReader reader)
 {
     data         = new();
     data.results = reader.ReadUInt32();
 }
コード例 #3
0
 public void Initialize(MPData args) => data = args as MinigameStatus;