Effect(六)—— BeAttackEffect

来源:互联网 发布:法国中国人知乎 编辑:程序博客网 时间:2024/06/03 05:32

目录为:Assets/Scripts/Effect/目录下
BeAttackEffect.cs

using UnityEngine;using System.Collections;using System.Collections.Generic;using System.Linq;//貌似只是实现了几个接口,但是具体细节在GameEntity部分//技能受击效果public class BeAttackEffect: IEffect{    //构造函数    public BeAttackEffect()    {        projectID = EffectManager.Instance.GetLocalId ();        mType = IEffect.ESkillEffectType.eET_BeAttack;    }    public override void Update()    {        if (isDead)        {            return;        }        base.Update ();    }    public override void OnLoadComplete()    {        //GameEntity部分定义        //判断enTarget        Ientity enTarget;        EntityManager.AllEntitys.TryGetValue (enTargetKey, out enTarget);        if (enTarget != null && obj != null)        {            Transform hitPoint = enTarget.RealEntity.transform.FindChild ("hitpoint");            if (hitPoint != null)            {                GetTransform ().parent = hitPoint;                GetTransform ().localPosition = new Vector3 (0.0f, 0.0f, 0.0f);            }        }        if (skillID == 0)        {            return;        }    }}
原创粉丝点击