public FixedFloatStack(float initial, StackMethod valueType, float floor, float ceiling, Action <float, int, float, int> onChanged = null) : base(12, onChanged) { switch (valueType) { case StackMethod.Top: base._checkAnyValueChange = false; this._updateValue = new Action(this.UpdateTop); break; case StackMethod.Sum: base._checkAnyValueChange = true; this._updateValue = new Action(this.UpdateSummed); break; case StackMethod.Multiplied: base._checkAnyValueChange = true; this._updateValue = new Action(this.UpdateMultiplied); break; case StackMethod.OneMinusMultiplied: base._checkAnyValueChange = true; initial = 1f - initial; this._updateValue = new Action(this.UpdateOneMinusMultiplied); break; } this._floor = floor; this._ceiling = ceiling; base.onChanged = (Action <float, int, float, int>)Delegate.Combine(base.onChanged, new Action <float, int, float, int>(this.SelfOnChanged)); base.Push(initial, true); }
public Stack AddStack(Slot slot, StackType type = StackType.undefined, StackMethod stackMethod = StackMethod.normal) { var stack = new Stack(this, cardBack, slotTex, spriteBatch, stackOffsetHorizontal, stackOffsetVertical) { slot = slot, method = stackMethod, type = type }; slot.stack = stack; stacks.Add(stack); dragonDrop.Add(slot); return(stack); }
public void OnSetStackMethod(SubDatasetSubjectiveStackedGroup group, StackMethod method) {}
public static FixedFloatStack CreateDefault(float initValue, StackMethod stackMethod, float floor, float ceiling, Action <float, int, float, int> onChanged = null) { return(new FixedFloatStack(initValue, stackMethod, floor, ceiling, onChanged)); }