Exemplo n.º 1
0
 private void Awake()
 {
     state           = State.Idle;
     manager         = FindObjectOfType <GameManager>();
     extractorList   = new List <Extractor>();
     storageNodeList = new List <StorageNode>();
     unit            = GetComponent <GathererUnit>();
     inventoryText   = gameObject.GetComponentInChildren <TextMesh>();
     inventorySpace  = 50;
     UpdateInventoryText();
     gathererUI = this.GetComponent <GathererUI>();
     GameManager.OnExtractorDemolishListeners += RemoveExtractorFromPlan;
     GameManager.OnStorageDemolishListeners   += RemoveStorageFromPlan;
 }
Exemplo n.º 2
0
    private void Awake()
    {
        _instance      = this;
        teamInterfaces = new UIElements[2];
        teamInterfaces[0].inventorySpaces = aInventorySpaces;
        teamInterfaces[1].inventorySpaces = bInventorySpaces;

        teamInterfaces[0].instructionSheet = aInstructionSheet;
        teamInterfaces[1].instructionSheet = bInstructionSheet;

        teamInterfaces[0].message = aMessage;
        teamInterfaces[1].message = bMessage;
        //teamInterfaces[0].message.text = "";
        //teamInterfaces[1].message.text = "";
        //teamInterfaces[0].message.color = new Color(1f, 0f, 0f, 1f);
        //teamInterfaces[1].message.color = new Color(1f, 0f, 0f, 1f);
        teamInterfaces[0].messageActive = ShowTextMessage(teamInterfaces[0].message);
        teamInterfaces[1].messageActive = ShowTextMessage(teamInterfaces[1].message);
        teamInterfaces[0].progress      = aProgress;
        teamInterfaces[1].progress      = bProgress;
    }