Esempio n. 1
0
    void Awake()
    {
        if (instance)
        {
            Debug.LogWarning("Another instance of daynight cycle");
            return;
        }

        instance = this;
    }
Esempio n. 2
0
 private void Start()
 {
     pManager        = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerInputManager>();
     ddn             = GetComponent <DisplayDayNight>();
     dnLight         = GetComponent <DayNightLighting>();
     fwm             = GameObject.Find("FlowingWaterManager").GetComponent <FlowingWaterManager>();
     poseCtrl        = GameObject.Find("Pose").GetComponent <PoseController>();
     cc              = GameObject.Find("Main Camera").GetComponent <CameraController>();
     Fade.OnEndFade += ChangeDayNight;
     isDay           = isDayTime;
     ddn.ChangeSky(isDay);
     sEnd = GameObject.FindGameObjectWithTag("Goal").GetComponent <StageEndJudge>();
 }