public Entity AddstateDpad(MTON._enum.Dirn newDpad) { var component = _stateDpadComponentPool.Count > 0 ? _stateDpadComponentPool.Pop() : new stateDpadComponent(); component.dpad = newDpad; return(AddComponent(ComponentIds.stateDpad, component)); }
public Entity AddeventDpad(int newID, MTON._enum.Dirn newDpad, float newMdir) { var component = _eventDpadComponentPool.Count > 0 ? _eventDpadComponentPool.Pop() : new eventDpadComponent(); component.ID = newID; component.dpad = newDpad; component.mdir = newMdir; return(AddComponent(ComponentIds.eventDpad, component)); }
public Entity ReplacestateDpad(MTON._enum.Dirn newDpad) { var previousComponent = hasstateDpad ? stateDpad : null; var component = _stateDpadComponentPool.Count > 0 ? _stateDpadComponentPool.Pop() : new stateDpadComponent(); component.dpad = newDpad; ReplaceComponent(ComponentIds.stateDpad, component); if (previousComponent != null) { _stateDpadComponentPool.Push(previousComponent); } return(this); }
public Entity ReplaceeventDpad(int newID, MTON._enum.Dirn newDpad, float newMdir) { var previousComponent = haseventDpad ? eventDpad : null; var component = _eventDpadComponentPool.Count > 0 ? _eventDpadComponentPool.Pop() : new eventDpadComponent(); component.ID = newID; component.dpad = newDpad; component.mdir = newMdir; ReplaceComponent(ComponentIds.eventDpad, component); if (previousComponent != null) { _eventDpadComponentPool.Push(previousComponent); } return(this); }