예제 #1
0
    // Use this for initialization
    void Awake()
    {
        currentProduct = 0;
        productImages = new Texture[10];
        productImages[0] = Resources.Load<Texture>("known/office");
        productImages[1] = Resources.Load<Texture>("known/baby");
        productImages[2] = Resources.Load<Texture>("known/grocery");
        productImages[3] = Resources.Load<Texture>("known/banana");

        debugText = GameObject.Find("DebugText");
        totalBalance = 0;
        GUIProductImg = GameObject.Find("GUIProductImg");
        popup = gameObject.GetComponent<PopupText> ();

        GUIProductImg.guiTexture.texture = productImages[0];
    }
예제 #2
0
    void Awake()
    {
        popup = gameObject.GetComponent<PopupText> ();
        //popup message
        popupText = GameObject.Find ("PopupText");
        //multiplier array

        timer = GameObject.Find ("Timer").guiText;
        playerBalance = GameObject.Find ("PlayerBalance").guiText;
        PlayerPrefs.DeleteAll ();	// For testing purposes, resets balance
        balance = PlayerPrefs.GetInt ("Balance", 0); // Look into an alternative for saving player's balance other than PlayerPrefs
        myMultiplier = 1;
        //startTime = Time.time;
        timeLeft = 30.0f;
        count = 1;
        // E: Took out update(), don't need it here; update() is called by the game every frame
    }
 public static void Initialize()
 {
     canvas = GameObject.Find("Canvas");
     if (!popupText) popupText = Resources.Load<PopupText>("Prefabs/Popup Text Parent");
 }
예제 #4
0
 public static void Initialize()
 {
     canvas    = GameObject.Find("Canvas");
     popupText = Resources.Load <PopupText>("Prefabs/Enemy_Damage");
 }