Beispiel #1
0
    protected override void Start()
    {
        base.Start();
        manager = managerObj.GetComponent <ILevelManagerCollection>();

        waterBar1 = this.transform.GetChild(4).GetComponent <ProgressBar>();
        waterBar2 = this.transform.GetChild(6).GetComponent <ProgressBar>();

        setInitialBarValues(waterBar1, 0, manager.getWaterNeededInPool1());
        setInitialBarValues(waterBar2, 0, manager.getWaterNeededInPool2());
    }
Beispiel #2
0
    // Start is called before the first frame update
    void Start()
    {
        cc     = GetComponent <CircleCollider2D>();
        rb     = GetComponent <Rigidbody2D>();
        bc     = GetComponent <BoxCollider2D>();
        sr     = GetComponent <SpriteRenderer>();
        seeped = false;

        destructMap = GameObject.Find("Grid").transform.GetChild(3).GetComponent <Tilemap>();
        bounds      = destructMap.cellBounds;
        destroyed   = new int[3];
        stopMoving  = false;

        manager = GameObject.Find("GameManager").GetComponent <ILevelManagerCollection>();
    }