using Entitas; using UnityEngine; using System.Collections.Generic; using FluidDynamics; public class MasterSoulShootInfo { public int Target; public int Count; public float TimeLeft; } [Game] public class MasterSoulComponent : IComponent { public float ShakeTimeLeft; public Fluid_Dynamics_Game_Emitter Emitter; public float ShootTimeLeft; public Queue ShootTargetQueue = new Queue(); public List ShootPreList = new List(); } namespace Game { public abstract partial class Util { public static void ClearMasterSoul(GameEntity entity) { var masterSoul = entity.masterSoul; masterSoul.ShakeTimeLeft = 0; masterSoul.ShootTimeLeft = 0; masterSoul.ShootTargetQueue.Clear(); } public static void SetMasterSoulDir(GameEntity entity, Vector2 dir) { var masterSoul = entity.masterSoul; masterSoul.Emitter.SetParticleDir(dir); } public static void AddMasterSoulShootTarget(GameEntity entity, int target, int count) { var masterSoul = entity.masterSoul; var newInfo = new MasterSoulShootInfo { Target = target, Count = count, TimeLeft = GameConst.MasterSoulShootPreTime, }; masterSoul.ShootPreList.Add(newInfo); } } }