public static bool CheckForStatus(GameObject self, Constants.StatusType type) { bool result = false; List <Status> statusList = GetAllStatusOnTarget(self); if (statusList == null) { return(false); } int count = statusList.Count; for (int i = 0; i < count; i++) { if (statusList[i].statusType == type) { result = true; break; } } return(result); }
public StatusTypeInfo(StatusType statusType, float duration, Constants.EffectStackingMethod stackMethod, float interval = 0f, int maxStacks = 1, string onCompleteEffectName = "") { this.statusType = statusType; this.maxStacks = maxStacks; this.onCompleteEffectName = onCompleteEffectName; this.duration = duration; this.interval = interval; this.stackMethod = stackMethod; }
//public Status(StatusInfo statusInfo, float duration, float interval) : this(statusInfo, duration) //{ // intervalTimer = new Timer("Interval", interval, true, Tick); //} protected virtual void SetUp(StatusInfo info) { statusType = info.typeInfo.statusType; MaxStack = info.typeInfo.maxStacks; Target = info.targetInfo.target; Source = info.targetInfo.source; SourceAbility = info.targetInfo.sourceAbility; SourceEffect = info.targetInfo.sourceEffect; onCompleteEffect = info.GetOnCompleteEffect(); StackCount = 1; stackMethod = info.typeInfo.stackMethod; }
public StatusTypeInfo(StatusType statusType, float duration, Constants.EffectStackingMethod stackMethod, Vector2 vfxPosOffset, string vfxName = "", float interval = 0f, int maxStacks = 1, string onCompleteEffectName = "", string animBool = "") { this.statusType = statusType; this.maxStacks = maxStacks; this.onCompleteEffectName = onCompleteEffectName; this.duration = duration; this.interval = interval; this.stackMethod = stackMethod; this.animBool = animBool; this.vfxName = vfxName; this.vfxPosOffset = vfxPosOffset; }
public List <Status> GetStatusListByType(Constants.StatusType type) { List <Status> results = new List <Status>(); int count = activeStatusList.Count; for (int i = 0; i < count; i++) { if (activeStatusList[i].statusType == type) { results.Add(activeStatusList[i]); } } return(results); }
//public Status(StatusInfo statusInfo, float duration, float interval) : this(statusInfo, duration) //{ // intervalTimer = new Timer("Interval", interval, true, Tick); //} protected virtual void SetUp(StatusInfo info) { statusType = info.typeInfo.statusType; MaxStack = info.typeInfo.maxStacks; Target = info.targetInfo.target; Source = info.targetInfo.source; SourceAbility = info.targetInfo.sourceAbility; SourceEffect = info.targetInfo.sourceEffect; onCompleteEffect = info.GetOnCompleteEffect(); StackCount = 1; stackMethod = info.typeInfo.stackMethod; AnimBoolName = info.typeInfo.animBool; vfxName = info.typeInfo.vfxName; vfxOffset = info.typeInfo.vfxPosOffset; //CreateVFX(); }
private void SetStatus(Constants.StatusType status, string message) { StatusText = message; StatusType = status; }