public Entity AddstateButton(MTON._enum.Button newBMode, MTON._enum.Type newBType) { var component = _stateButtonComponentPool.Count > 0 ? _stateButtonComponentPool.Pop() : new stateButtonComponent(); component.bMode = newBMode; component.bType = newBType; return(AddComponent(ComponentIds.stateButton, component)); }
public Entity AddeventButton(int newID, MTON._enum.Button newBMode, MTON._enum.Type newBType) { var component = _eventButtonComponentPool.Count > 0 ? _eventButtonComponentPool.Pop() : new eventButtonComponent(); component.ID = newID; component.bMode = newBMode; component.bType = newBType; return(AddComponent(ComponentIds.eventButton, component)); }
public Entity ReplacestateButton(MTON._enum.Button newBMode, MTON._enum.Type newBType) { var previousComponent = hasstateButton ? stateButton : null; var component = _stateButtonComponentPool.Count > 0 ? _stateButtonComponentPool.Pop() : new stateButtonComponent(); component.bMode = newBMode; component.bType = newBType; ReplaceComponent(ComponentIds.stateButton, component); if (previousComponent != null) { _stateButtonComponentPool.Push(previousComponent); } return(this); }
public Entity ReplaceeventButton(int newID, MTON._enum.Button newBMode, MTON._enum.Type newBType) { var previousComponent = haseventButton ? eventButton : null; var component = _eventButtonComponentPool.Count > 0 ? _eventButtonComponentPool.Pop() : new eventButtonComponent(); component.ID = newID; component.bMode = newBMode; component.bType = newBType; ReplaceComponent(ComponentIds.eventButton, component); if (previousComponent != null) { _eventButtonComponentPool.Push(previousComponent); } return(this); }