public void ReplaceReplayList(SCReplayList newValue) { var index = GameComponentsLookup.ReplayList; var component = (ReplayListComponent)CreateComponent(index, typeof(ReplayListComponent)); component.value = newValue; ReplaceComponent(index, component); }
public GameEntity SetReplayList(SCReplayList newValue) { if (hasReplayList) { throw new Entitas.EntitasException("Could not set ReplayList!\n" + this + " already has an entity with ReplayListComponent!", "You should check if the context already has a replayListEntity before setting it or use context.ReplaceReplayList()."); } var entity = CreateEntity(); entity.AddReplayList(newValue); return(entity); }
public void ReplaceReplayList(SCReplayList newValue) { var entity = replayListEntity; if (entity == null) { entity = SetReplayList(newValue); } else { entity.ReplaceReplayList(newValue); } }