Effect(八)—— NormalEffect

来源:互联网 发布:詹姆斯新秀赛季数据 编辑:程序博客网 时间:2024/06/03 04:25

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

using UnityEngine;using System.Collections;using System.Collections.Generic;using System.Linq;using System;public class NormalEffect: IEffect{    public enum NormalEffectType    {        eNE_Leading,        eNE_Move,    }    public int modelID;    public NormalEffectType NEType;    public GameObject Target;    public NormalEffect()    {        projectIDID = EffectManager.Instance.GetLocalId ();        Target = null;        mType = IEffect.ESkillEffectType.eET_Normal;    }    public override void Update()    {        if (isDead)        {            return;        }        base.Update ();    }    public override void OnLoadComplete()    {        if (Target != null)        {            GetTransform ().parent = Target.transform;        }        //无偏移位置,旋转        GetTransform ().localPosition = new Vector3 (0.0f, 0.0f, 0.0f);        GetTransform ().localRotation = Quaternion.identity;    }}
原创粉丝点击