using CommonAI.Zone; using CommonAI.ZoneClient; using CommonLang.Geometry; using ET; using ET.Client; using ET.EventType; using Sirenix.Utilities; using System; using System.Security.Claims; public class BattleSpell : BattleObject { public Vector3 OriginPos; public ZoneSpell ZoneSpell { get { return ZoneObject as ZoneSpell; } } public override void OnAwake(ZoneObject zo) { base.OnAwake(zo); var zs = zo as ZoneSpell; OriginPos = new Vector3(zs.X, zs.Y, zs.LaunchHeight); if(!zs.Info.FileNameSpawn.IsNullOrWhitespace()) { //出生特效 var spawnEffect = new LaunchEffect() { Name = zs.Info.FileNameSpawn, SoundName = zs.Info.AudioName, IsLoop = zs.Info.IsAudioLoop }; EventSystem.Instance.Publish(PlayEffectEvent.Static.Clone(spawnEffect, zs.ObjectID, CommonLang.Geometry.Vector3.Zero)); } } public override void OnSleep() { base.OnSleep(); if(!ZoneSpell.Info.FileNameDestory.IsNullOrWhitespace()) { //TODO:支持法术destroy特效 } } }