Exemple #1
0
    public void ReplaceReplayList(SCReplayList newValue)
    {
        var index     = GameComponentsLookup.ReplayList;
        var component = (ReplayListComponent)CreateComponent(index, typeof(ReplayListComponent));

        component.value = newValue;
        ReplaceComponent(index, component);
    }
Exemple #2
0
    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);
    }
Exemple #3
0
    public void ReplaceReplayList(SCReplayList newValue)
    {
        var entity = replayListEntity;

        if (entity == null)
        {
            entity = SetReplayList(newValue);
        }
        else
        {
            entity.ReplaceReplayList(newValue);
        }
    }