Beispiel #1
0
    void Start()
    {
        GameObject mobileObject = GameObject.FindGameObjectWithTag("Mobile");

        if (mobileObject != null)
        {
            Mobile mobileComponent = mobileObject.GetComponent <Mobile>();
            if (mobileComponent != null)
            {
                mobile = mobileComponent;
                //pushStory();
            }
        }
        GameObject cashMeterObject = GameObject.FindGameObjectWithTag("CashMeter");

        if (cashMeterObject != null)
        {
            CashMeter cashMeterComponent = cashMeterObject.GetComponent <CashMeter>();
            if (cashMeterComponent != null)
            {
                cashMeter = cashMeterComponent;
            }
        }
        GameObject datorObject = GameObject.FindGameObjectWithTag("ComputerText");

        if (datorObject != null)
        {
            Dator datorComponent = datorObject.GetComponent <Dator>();
            if (datorComponent != null)
            {
                dator = datorComponent;
                PushClipper();
            }
        }
    }
    // 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>();
    }