Inheritance: MonoBehaviour
Example #1
0
    // Use this for initialization
    void Start()
    {
        finder = gameObject.GetComponent<SeePlayer>();

        if(finder != null)
            finder.isAlternateAngle = true;
    }
Example #2
0
    // Use this for initialization
    void Start()
    {
        finder = gameObject.GetComponent <SeePlayer>();

        if (finder != null)
        {
            finder.isAlternateAngle = true;
        }
    }
Example #3
0
    // Use this for initialization
    void Start()
    {
        //Create reference to nav agent component
        navAgent = transform.GetComponent <UnityEngine.AI.NavMeshAgent> ();
        //Position will be set using grid move
        navAgent.updatePosition = false;

        string[] currentMove = movements [step].Split(',');
        if (currentMove [0] == "w")
        {
            waitTime = Time.fixedTime + float.Parse(currentMove [1]);
            step++;
            if (step >= movements.Length)
            {
                step = 0;
            }
        }
        //Do not put two waits in a row
        currentMove = movements [step].Split(',');
        dest        = new Vector3(float.Parse(currentMove [0]), 0.0f, float.Parse(currentMove [1]));
        step++;

        viewer = gameObject.GetComponent <SeePlayer> ();
    }
Example #4
0
 void Start()
 {
     pos_initiale = transform.localPosition;
     script_enemy = this.GetComponent <Enemy> ();
     script_see   = this.GetComponent <SeePlayer> ();
 }
Example #5
0
 // Use this for initialization
 void Start()
 {
     finder = gameObject.GetComponent<SeePlayer>();
 }
Example #6
0
 // Use this for initialization
 void Start()
 {
     finder = gameObject.GetComponent <SeePlayer>();
 }