目录为:Assets/Scripts/Effect/目录下
BuffEffect.cs
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
//这个类仍然很简单
public class BuffEffect: IEffect
{
//构造函数
public BuffEffect()
{
mType = IEffect.ESkillEffectType.eET_Buff;
}
public Ientity entity;
public uint InstID;
public override void OnLoadComplete ()
{
if (entity == null)
{
return;
}
GetTransform ().parent = entity.RealEntity.objBuffPoint.transform;
GetTransform ().position = entity.RealEntity.objBuffPoint.transform.position;
}
public override void Update()
{
if (isDead)
{
return;
}
base.Update ();
}
}