Пример #1
0
    void Start()
    {
        timer = 0;
        audio = GetComponent<AudioSource>();
        upperBody = new List<GameObject>();
        lowerBody = new List<GameObject>();
        upperBodyItems = new string[] { "blouse", "jacket", "shirt", "tank" };
        lowerBodyItems = new string[] { "miniskirt", "shorts", "pants", "dress" };

        for (int i = 0; i < 4; i++)
        {
            upperBody.Add(Resources.Load("Prefabs/" + upperBodyItems[i]) as GameObject);
            lowerBody.Add(Resources.Load("Prefabs/" + lowerBodyItems[i]) as GameObject);
        }

        //shooter ref
        shoot_ref = GameObject.Find("Fashion_Shooter_Gun").GetComponent<shooter>();

        //inventory ref
        invent_ref = GameObject.Find("FashionPolice").GetComponent<InventorySpawnner>();

        //movement ref
        move_ref = GameObject.Find("FashionPolice").GetComponent<movement>();

        //inventroy changeref 
        //= GameObject.Find("").GetComponent<InventoryChanger>();

        score_track = GameObject.Find("FashionPolice").GetComponent<ScoreTracker>();
        speechBubble = GameObject.FindGameObjectWithTag("SpeechBubble").GetComponentInChildren<Image>();
        feedback1 = GameObject.Find("SpeechBubble").GetComponentInChildren<Text>();
        feedback2 = GameObject.Find("SpeechBubble").GetComponentInChildren<Text>();
    }
Пример #2
0
 //talk1 talk_ref = null;
 void Start()
 {
     inventorySpawnnerScript = GameObject.Find("FashionPolice").GetComponent<InventorySpawnner>();
     talk1Script = GameObject.Find(inventorySpawnnerScript.modelCollider.name).GetComponent<talk1>();
     //talk1 = GameObject.Find)(
 }