Exemple #1
0
 private void beginEvent()
 {
     currentIndex = 0;
     m_running    = true;
     qt.finishEvent();
     items = FindObjectOfType <ScoreSystem>().getList();
     mom.putIntoCart();
 }
Exemple #2
0
    // Update is called once per frame
    void Update()
    {
        anim.SetBool(animId_bHoldItem, holdItem != null);
        if (KassenEvent.isRunning())
        {
            return;
        }


        //M�gliche aktive Effekte berechnen: verschnellert oder verlangsamt Simulation
        float deltaTime = calculateEffectValue(Time.deltaTime);


        if (quicktimeEvent.running)
        {
            if (eatingProgress == 1.0f)
            {
                quicktimeEvent.finishEvent();
                finishedEating();
            }
            else
            {
                quicktimeEvent.influenceEvent(quickTimeRate * deltaTime);
                eatingProgress = Mathf.Clamp01(eatingProgress + eatingRate * Time.deltaTime);
            }
        }

        //Abklingzeit und es darf nichts halten
        if (DoSomethingCooldown[0] <= 0.0f && holdItem == null)
        {
            makeDecision();
        }

        if (DoSomethingCooldown[0] > 0)
        {
            DoSomethingCooldown[0] -= deltaTime;
        }

        if (soothedEffect[0] > 0)
        {
            soothedEffect[0] -= Time.deltaTime;
        }

        if (enrageEffect[0] > 0)
        {
            enrageEffect[0] -= Time.deltaTime;
        }
    }