Example #1
0
    private void applyDomoticsControllerSettings()
    {
        DomoticaController domoticsController = GameObject.FindObjectOfType <DomoticaController>();

        domoticsController.SwitchCurtainsWithoutAnimation(startWithOpenCurtains);
        domoticsController.SwitchLights(startWithLightsOn);
    }
    public void InitializeScenario()
    {
        // Initialize scene based on bool parameters
        DomoticaController dom = GameObject.FindObjectOfType <DomoticaController>();

        dom.SwitchCurtainsWithoutAnimation(startWithCurtainsOpen);
        dom.SwitchLights(startWithLightsOn);
        GameObject.FindObjectOfType <DayNightManager>().SetDayPart(scenarioDayPart);

        // Teleports the player to the starting position of the scenario
        GameObject player = FindObjectOfType <PlayerController>().GetPlayer();

        player.transform.SetPositionAndRotation(startingPoint.transform.position, startingPoint.transform.rotation);

        isBeingUsed = true;
    }