Ejemplo n.º 1
0
    // Called when the state is enabled
    void OnEnable()
    {
        navMeshAgent       = GetComponent <NavMeshAgent>();
        navMeshAgent.speed = 3.5f;

        textObject.GetComponent <TextToUI>().SetText(textObject.s_limping);
    }
Ejemplo n.º 2
0
    void DoneEating()
    {
        gameObject.GetComponent <Gollum_Hunger>().hunger += 1;
        textObject.GetComponent <TextToUI>().SetText(textObject.g_catching);

        SendEvent("AteButterfly");
    }
Ejemplo n.º 3
0
 // Called when the state is enabled
 void OnEnable()
 {
     textObject.GetComponent <TextToUI>().SetText(textObject.s_waiting);
     navMeshAgent       = GetComponent <NavMeshAgent>();
     navMeshAgent.speed = 8f;
     Food.SetActive(true);
     gameObject.GetComponent <Sam_Health>().health = 5f;
 }
Ejemplo n.º 4
0
    // Update is called once per frame
    void Update()
    {
        PlaceWaypoint();
        if (gameObject.tag == "Gollum")
        {
            textObject.GetComponent<TextToUI>().SetText("Yes?");

        }
    }
Ejemplo n.º 5
0
    private void OnTriggerEnter(Collider other)
    {
        if (other.gameObject.tag == "Butterfly")
        {
            other.gameObject.SetActive(false);
            textObject.GetComponent <TextToUI>().SetText(textObject.g_catching);

            SendEvent("CaughtButterfly");
        }
    }
Ejemplo n.º 6
0
 // Update is called once per frame
 void Update()
 {
     gameObject.transform.position = Pot.transform.position;
     gameObject.transform.rotation = Pot.transform.rotation;
     textObject.GetComponent <TextToUI>().SetText(textObject.s_cooking);
     timer += Time.deltaTime;
     if (timer > 3f)
     {
         SendEvent("DoneCooking");
     }
 }
Ejemplo n.º 7
0
    void Update()
    {
        if (gameObject.tag == "Sam")
        {
            SendEvent("MoveToPlayer");
        }

        if (gameObject.tag == "Gollum")
        {
            if (gameObject.GetComponent <Gollum_Hunger>().hungry)
            {
                textObject.GetComponent <TextToUI>().SetText("Gollum is hungry!");

                SendEvent("Hungry");
            }
            if (!gameObject.GetComponent <Gollum_Hunger>().hungry)
            {
                textObject.GetComponent <TextToUI>().SetText("heehee");

                SendEvent("NotHungry");
            }
        }
    }
Ejemplo n.º 8
0
 private void OnCollisionEnter(Collision collision)
 {
     if (gameObject.tag == "Sam")
     {
         if (collision.gameObject.tag == "Pot")
         {
             SendEvent("CookingPot");
         }
     }
     if (gameObject.tag == "Gollum")
     {
         if (collision.gameObject.tag == "Artifact")
         {
             textObject.GetComponent <TextToUI>().SetText(textObject.g_artifact);
             SendEvent("GotArtifact");
         }
     }
 }
Ejemplo n.º 9
0
 // Called when the state is enabled
 void OnEnable()
 {
     textObject.GetComponent <TextToUI>().SetText(textObject.g_bargaining);
 }
Ejemplo n.º 10
0
 // Called when the state is enabled
 void OnEnable()
 {
     textObject.GetComponent <TextToUI>().SetText("Let's go Mr Frodo");
 }
Ejemplo n.º 11
0
 // Called when the state is enabled
 void OnEnable()
 {
     gameObject.transform.position = Pot.transform.position;
     gameObject.transform.rotation = Pot.transform.rotation;
     textObject.GetComponent <TextToUI>().SetText(textObject.s_resting);
 }
Ejemplo n.º 12
0
 void OnEnable()
 {
     reached    = false;
     timer      = 0f;
     textObject = textObject.GetComponent <TextToUI>();
 }
Ejemplo n.º 13
0
 // Called when the state is enabled
 void OnEnable()
 {
     vision = vision.GetComponent <Vision>();
     Waypoint.transform.position = ButterflyWaypoint.transform.position;
     textObject.GetComponent <TextToUI>().SetText(textObject.g_chasing);
 }
Ejemplo n.º 14
0
 // Called when the state is enabled
 void OnEnable()
 {
     textObject.GetComponent <TextToUI>().SetText(textObject.g_satisfied);
     gameObject.GetComponent <Gollum_Hunger>().cookedFood = true;
 }
Ejemplo n.º 15
0
 // Called when the state is enabled
 void OnEnable()
 {
     textObject.GetComponent <TextToUI>().SetText("The Artifact is mine!");
 }