Ejemplo n.º 1
0
    void Death()
    {
        //time to activate ragdollz or death anmin
        //for now we just remove the object as there is nothing set up for thi
        if (skeleAiChace == null)
        {
            skeleAiChace = gameObject.GetComponent <SkeletonAi> ();
        }
        skeleAiChace.AiRandomPatrolPoints();
        Transform rndSpwn   = reCache.AiRandomSpawn().transform;
        Vector3   v3Current = new Vector3(0, 0, 0);

        v3Current = transform.eulerAngles;
        Quaternion qRotation = Quaternion.identity;

        qRotation.eulerAngles = v3Current;
        Instantiate(deathRagdoll, transform.position, qRotation);
        transform.position = rndSpwn.position;
        RemoveArrows();
        health = maxHealth;
    }
Ejemplo n.º 2
0
 // Use this for initialization
 void Start()
 {
     skelAiCache = gameObject.GetComponentInParent <SkeletonAi> ();
     myColor     = notInShootRange;
 }