Ejemplo n.º 1
0
    //initialization
    private void Start()
    {
        GameEvents.current.onTowerSelected   += OnTowerSelected;
        GameEvents.current.onTowerUnselected += OnTowerUnselected;

        buttons    = this.gameObject.GetComponentsInChildren <Button>();
        rect       = this.gameObject.GetComponent <RectTransform>();
        moveUiComp = this.gameObject.GetComponent <MoveUIComponent>();
        this.gameObject.SetActive(false);
    }
Ejemplo n.º 2
0
    // initialization
    private void Start()
    {
        GameEvents.current.onTowerOrTrapBuild += cancel;

        buttons    = this.gameObject.GetComponentsInChildren <Button>();
        rect       = this.gameObject.GetComponent <RectTransform>();
        moveUiComp = this.gameObject.GetComponent <MoveUIComponent>();
        kotoTower  = GameObject.FindGameObjectWithTag("Koto Tower").GetComponent <ClickOnKotoTower>();
        generator  = GameObject.FindGameObjectWithTag("Generator").GetComponent <ClickOnGenerator>();

        this.gameObject.SetActive(false);
    }
Ejemplo n.º 3
0
    // initialization
    private void Start()
    {
        GameEvents.current.onTruckDestroyedEnter += OnTruckDestroyed;
        GameEvents.current.onTruckAnswerEnter    += OnTruckAnswer;
        GameEvents.current.onTruckSentEnter      += OnTruckSent;

        truckMove    = false;
        buttons      = this.gameObject.GetComponentsInChildren <Button>(true);
        rect         = this.gameObject.GetComponent <RectTransform>();
        rectHeight   = rect.rect.height;
        currentValue = rectHeight + 10;
        moveUiComp   = this.gameObject.GetComponent <MoveUIComponent>();
    }