コード例 #1
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);
    }