Esempio n. 1
0
    void Start()
    {
        counter = new Counter();
        //common = new Common();

        members = transform.parent.parent.GetComponentsInChildren <BasicStat>(true);
        fullHP  = new int[members.Length];
        tempHP  = new int[members.Length];

        for (int i = 0; i < members.Length; i++)
        {
            fullHP[i] = members[i].hp;
        }



        aniSwitcher = transform.parent.GetComponentInChildren <AniSwitcher>();
    }
Esempio n. 2
0
    //int c;


    void Start()
    {
        //nav = transform.parent.GetComponent<NavMeshAgent>();



        ans = transform.parent.parent.GetComponentInChildren <AniSwitcher>();


        if (transform.parent.Find("WindDot(Clone)") != null)
        {
            Transform pos = com.CalShortestDistance(transform.position);
            //Debug.Log(pos.name);

            if (pos.Find("WindSwing(Clone)") != null)
            {
                pos.Find("WindSwing(Clone)").SendMessage("AddFireWind");
            }
        }

        transform.parent.SendMessage("StopMovement", true);

        if (damaged == false)
        {
            if (transform.parent.GetComponent <BasicStat>().abFire) //absorpstion!!!
            {
                transform.parent.SendMessage("HpModifier", damage);
                damaged = true;
            }
            else
            {
                if (ans != null)
                {
                    ans.SetHurt(true);
                }

                transform.parent.SendMessage("HpModifier", -damage);
                damaged = true;
            }
        }


        //c = coun.Count();
    }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     aniSwitcher = transform.parent.GetComponent <AniSwitcher>();
 }