Exemple #1
0
    public void ReplaceLoginCMD(SkynetClient.AuthPackage newCmd)
    {
        var index     = InputComponentsLookup.LoginCMD;
        var component = (LoginCMD)CreateComponent(index, typeof(LoginCMD));

        component.cmd = newCmd;
        ReplaceComponent(index, component);
    }
Exemple #2
0
    public InputEntity SetLoginCMD(SkynetClient.AuthPackage newCmd)
    {
        if (hasLoginCMD)
        {
            throw new Entitas.EntitasException("Could not set LoginCMD!\n" + this + " already has an entity with LoginCMD!",
                                               "You should check if the context already has a loginCMDEntity before setting it or use context.ReplaceLoginCMD().");
        }
        var entity = CreateEntity();

        entity.AddLoginCMD(newCmd);
        return(entity);
    }
Exemple #3
0
    public void ReplaceLoginCMD(SkynetClient.AuthPackage newCmd)
    {
        var entity = loginCMDEntity;

        if (entity == null)
        {
            entity = SetLoginCMD(newCmd);
        }
        else
        {
            entity.ReplaceLoginCMD(newCmd);
        }
    }