Example #1
0
    // Use this for initialization
    void Start()
    {
        currentCapacity = 0;
        lightControl    = GetComponent <LightControl> ();
        bb = GetComponent <BuildingBehaivor3> ();

        StartCoroutine("chargingBatteryBehaivor");
    }
Example #2
0
    void Start()
    {
        bb       = GetComponent <BuildingBehaivor3> ();
        animator = GetComponent <Animator> ();
        grid     = GameObject.Find("A*").GetComponent <Grid> ();

        isPlaced = false;

        sr = GetComponent <SpriteRenderer> ();
    }
Example #3
0
 void Update()
 {
     if (GetComponent <GenericUIController> ().isActive)
     {
         selectedGameObjects = GetComponent <GenericUIController> ().UIcaller;
         if (selectedGameObjects.Count == 1)
         {
             bb                          = selectedGameObjects [0].GetComponent <BuildingBehaivor3> ();
             nameText.text               = bb.BuildingName;
             statusText.text             = bb.CurrentState;
             invText.text                = bb.GetComponent <Inventory> ().ContentReadable();
             showProductionCheckBox.isOn = bb.ActiveBuilding;
             flagGroup.SetActive(!bb.ActiveBuilding);
         }
         else
         {
             nameText.text   = "several..";
             statusText.text = "undefined";
             invText.text    = "undefined";
         }
     }
 }