Esempio n. 1
0
    void Update()
    {
        if (transform.position.y < fallBounndary)
        {
            DamageTaken(100);
        }

        if (Input.GetButtonDown("Submit") && chestTriggerEntered)
        {
            if (!currentChest.opened)
            {
                Debug.Log("OPEN");
                GameMaster.PlaySound("Open Chest");
                currentChest.OpenChest();
            }
            else if (!currentChest.empty)
            {
                Debug.Log("EMPTY");
                //GameMaster.PlaySound("Empty Chest");
                currentChest.EmptyChest();
            }

            //TODO: Do some sort of chest animation
            //TODO: Spawn some item - don't know what yet
        }
    }