예제 #1
0
 // Use this for initialization
 void Start()
 {
     //set thisparent to be this collider's parent in the hierarchy; i.e. the object that contains the object with this script
     //thisParent = ;
     scriptThing = thisParent.GetComponentInParent <ScriptEnemyClass>();
     eMove       = GetComponentInParent <ScriptEnemyMovement>();
 }
예제 #2
0
    public GameObject onDeathObject; //spawn this on death

    //public NavMeshAgent navi;


    // Use this for initialization
    void Start()
    {
        eMove                = GetComponent <ScriptEnemyMovement>();
        detector             = GetComponentInChildren <ScriptDetectionRadius>();
        health               = startingHealth;
        baseAttackRangeFloat = attackRange.radius;
        baseSightRangeFloat  = sightRange.radius;
        AttackRangeFloat     = baseAttackRangeFloat;
        SightRangeFloat      = baseSightRangeFloat;
        if (Alertness == -1) //if alertness has not been set
        {
            Alertness = baseAlertness;
        }
        AlertnessApplication(Alertness);
        //if(navi != null)
        {
            //AgentAssignment();
            //navi.velocity = Vector3.zero;
            //navi.Stop();
        }
    }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     eMove    = GetComponent <ScriptEnemyMovement>();
     detector = GetComponentInChildren <ScriptDetectionRadius>();
     health   = startingHealth;
 }