Beispiel #1
0
    void Start()
    {
        instance = this;

        adviceText = GameObject.Find("PanelConversa/AdviceSimple/Text").GetComponent <Text>();

        gameObject.SetActive(false);
    }
Beispiel #2
0
        public override void Update()
        {
            base.Update();


            if (Input.GetKey(KeyCode.F))
            {
                LeaveBucket();
            }

            //Altura.text = String.Format("{0:0.00}" , iso_object.positionZ);

            if (canFillBucket)
            {
                StartCoroutine(FillBucketSlowly());
                // SoundManager.instance.PlaySingle(SoundManager.instance.river);
            }



            UpdateCaaporaStatus();

            if (_running)
            {
                run();
            }
            else
            {
                walk();
            }



            if (!GameManager.isAnimating)
            {
                StatusHP.text = _life.ToString();
            }



            if (!Inventory.isEmpty())
            {
                if (Balde.instance.waterPercent <= 0.0f)
                {
                    AdviceSimple.showAdvice("Ande próximo ao lago para encher o balde com água!");
                }
            }


            if (Inventory.isEmpty())
            {
                if (canCatch(balde))
                {
                    Advice.instance.ShowAdvice(true);

                    if (Input.GetKeyDown(KeyCode.A) || InputController.instance.AClick)
                    {
                        AddItemToInventory(balde);

                        _animator.SetTrigger("Catch");

                        balde.SetActive(false);
                    }
                }
            } // End IsEmpty
        }     //End Update()