// private KeywordRecognizer m_Recognizer;

    // Use this for initialization
    public void ProcessInput()
    {
        //call a variable based on string name?
        if (touchCount == 1)
        {
            dialogueHandler.Narrate("FirstKnock", 2);
            exHandler.Expression(exHandler.notice, 1.0f);
        }
        randCount = UnityEngine.Random.Range(1, 3);
        switch (randCount)
        {
        case 1:
            if (eggParameter.TotalParameter >= eggParameter.PhaseA)
            {
                if (!eggPhysicalAI.isBusy)
                {
                    eggParameter.AddParameter(0, 2, 0);
                    eggPhysicalAI.RotateTowards(touchPosition);
                    exHandler.Expression(exHandler.notice, 1.0f);
                }
            }
            break;

        case 2:
            //Debug.Log("Jumpting towards you");
            eggParameter.AddParameter(0, 2, 0);
            eggPhysicalAI.JumpCloser(touchPosition);
            break;

        default:
            break;
        }
    }
Exemplo n.º 2
0
    IEnumerator LifeSpan()
    {
        float age = Random.Range(120, 180);

        yield return(new WaitForSeconds(age));

        //Move the egg away
        yield return(new WaitForSeconds(0.5f));

        dialogueHandler.Narrate("HatchlingDis", 2);
        Destroy(gameObject);
    }
    IEnumerator LifeSpan()
    {
        float time = 0;
        float age  = Random.Range(MinAge, MaxAge);

        Debug.Log("HAtchling Bornn");
        // while(time < age)
        // {
        //  time += Time.deltaTime;
        //  yield return null;
        // }
        yield return(new WaitForSeconds(age));

        transform.Find("Pop").gameObject.SetActive(true);
        yield return(new WaitForSeconds(0.5f));

        dialogueHandler.Narrate("HatchlingDis", 2);
        // gameController.ReproduceEgg();
        Destroy(gameObject);
    }