Exemple #1
0
    // Use this for initialization
    void Start()
    {
        if (instance != null)
        {
            Debug.LogError("Multiple instances of singleton!");
        }

        // TODO: Implement a safer singleton
        instance = this;

        // Create the simulation controller instance
        controller = new SimulationController();

        // Add some core components.
        controller.AddSimulationComponent <SimulationSceneController>();
        controller.AddSimulationComponent <VideoController>();
        controller.AddSimulationComponent <UIController>();
        controller.AddSimulationComponent <TimelineController>();
        controller.AddSimulationComponent <DecisionController>();
        controller.AddSimulationComponent <FeedbackController>();
        controller.AddSimulationComponent <ParticleController>();
        controller.AddSimulationComponent <MenuController>();
        controller.AddSimulationComponent <AudioController>();

        controller.AddSimulationComponent <TimeController>();
        //timeController.SetTimeLimit(80);

        // Initialize the simulation.
        controller.Initialize();
    }