Beispiel #1
0
    public override void Act(UnityEngine.Transform player, UnityEngine.Transform npc)
    {
        AnimatorStateInfo stateinfo = animator.GetCurrentAnimatorStateInfo(0);

        if (!stateinfo.IsName(info.name))
        {
            animator.SetInteger("State", info.id);
        }

        for (int index = 0; index < dragonController.Renderer.Length; ++index)
        {
            float value = dragonController.Renderer[index].material.GetFloat("_Cutoff");
            value += Time.fixedDeltaTime;
            value  = value > 1 ? 1 : value;
            dragonController.Renderer[index].material.SetFloat("_Cutoff", value);
            bool hasDesappear = value == 1 ? true : false;
            if (hasDesappear)
            {
                dragonController.DeSpawn();
            }
        }
    }
Beispiel #2
0
 public override void Act(UnityEngine.Transform player, UnityEngine.Transform npc)
 {
     dragonController.StateChange = false;
     //EventDispatcher.TriggerEvent(EventDefine.Event_Player_Damage, dragonController.AttackDamage);
     dragonController.DeSpawn();
 }