예제 #1
0
    public T addProcedure <T>(PROCEDURE_TYPE type, SceneProcedure parent = null) where T : SceneProcedure
    {
        SceneProcedure procedure = createProcedure <T>(this, type);

        if (parent != null)
        {
            parent.addChildProcedure(procedure);
        }
        mSceneProcedureList.Add(procedure.getProcedureType(), procedure);
        return(procedure as T);
    }
예제 #2
0
    public T addProcedure <T>(Type parent = null) where T : SceneProcedure
    {
        SceneProcedure procedure = createProcedure <T>(this);

        if (parent != null)
        {
            SceneProcedure parentProcedure = getProcedure(parent);
            if (parentProcedure == null)
            {
                logError("invalid parent procedure, procedure:" + procedure.getProcedureType());
            }
            parentProcedure.addChildProcedure(procedure);
        }
        mSceneProcedureList.Add(procedure.getProcedureType(), procedure);
        return(procedure as T);
    }
예제 #3
0
    public SceneProcedure addProcedure(Type type, Type parent = null)
    {
        SceneProcedure procedure = createInstance <SceneProcedure>(type);

        procedure.setGameScene(this);
        procedure.setType(type);
        if (parent != null)
        {
            SceneProcedure parentProcedure = getProcedure(parent);
            if (parentProcedure == null)
            {
                logError("invalid parent procedure, procedure:" + procedure.getType());
            }
            parentProcedure.addChildProcedure(procedure);
        }
        mSceneProcedureList.Add(procedure.getType(), procedure);
        return(procedure);
    }
예제 #4
0
    public T addProcedure <T>(PROCEDURE_TYPE type, PROCEDURE_TYPE parent = PROCEDURE_TYPE.PT_NONE) where T : SceneProcedure
    {
        SceneProcedure procedure = createProcedure <T>(this, type);

        if (parent != PROCEDURE_TYPE.PT_NONE)
        {
            SceneProcedure parentProcedure = getSceneProcedure(parent);
            if (parentProcedure != null)
            {
                parentProcedure.addChildProcedure(procedure);
            }
            else
            {
                logError("invalid parent procedure, procedure:" + type);
            }
        }
        mSceneProcedureList.Add(procedure.getProcedureType(), procedure);
        return(procedure as T);
    }