// Use this for initialization
    void Start()
    {
        QMeter = gameObject.GetComponent <QMeter>();

        //set the thriving sprite inactive
        thrivingSprite.SetActive(false);
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        turn             = 0;
        SkySwitch        = GameObject.FindGameObjectWithTag("SkyWater").GetComponent <SkySpriteSwitch>();
        L                = GameObject.FindGameObjectWithTag("GameController").GetComponent <LBar>();
        inv              = gameObject.GetComponent <Inventory>();
        Q                = gameObject.GetComponent <QMeter>();
        TURNtext         = GameObject.Find("Turn#").GetComponent <Text>();
        RAINFALLtext     = GameObject.Find("Rainfall").GetComponent <Text>();
        floodSpriteArray = GameObject.FindGameObjectWithTag("FloodWater").GetComponent <floodWaterSprites>().floodSpritesArray;
        floodRenderer    = GameObject.FindGameObjectWithTag("FloodWater").GetComponent <SpriteRenderer>();

        //start with this button inactive
        //this.gameObject.SetActive(false);
    }
示例#3
0
    // Use this for initialization
    void Start()
    {
        EventOBJ         = GameObject.FindGameObjectWithTag("Event");
        EventMessage     = EventOBJ.transform.Find("Message").GetComponent <Text>();
        EventOption1Text = EventOBJ.transform.Find("Button").GetComponentInChildren <Text>();
        EventOption2Text = EventOBJ.transform.Find("Button (1)").GetComponentInChildren <Text>();
        eventClass       = gameObject.GetComponent <Event>();

        //set up the Event Deck
        eventDeck = new List <Event>();
        fillEventDeck();


        //turn the Event popup off until needed
        EventOBJ.SetActive(false);

        bank = gameObject.GetComponent <CashMeter>();
        Q    = gameObject.GetComponent <QMeter>();
    }
示例#4
0
 private void Start()
 {
     agua = GameObject.FindGameObjectWithTag("Water");
     Q    = FindObjectOfType <QMeter>();
     Inv  = gameObject.GetComponent <Inventory>();
 }