public bool End(UInt32 mask) { bool result = false; TState activeState = ActiveState; if (activeState != null && ViMask32.HasAny(activeState.EndMask, mask)) { activeState.OnDeactive(); activeState.SetActive(false); result = true; } // for (int idx = 0; idx < _list.Count;) { TState iterState = _list[idx]; if (ViMask32.HasAny(iterState.EndMask, mask)) { iterState.OnEnd(); _list.RemoveAt(idx); } else { ++idx; } } // if (result) { Reset(); } return(result); }
public static UInt32 RoundMask(UInt32 mask) { return(ViMask32.Value(mask, (UInt32)(ViSpellSelectRalationMask.SELF_MASK)) >> 12); }