Ejemplo n.º 1
0
    // Update is called once per frame
    void Update()
    {
        time.Update();
        if (time.IsPause())
        {
            return;
        }

        //残り時間(半分)による1フレームあたりの移動量
        var add = 1.0f / time.GetToInitSeconds() / 60.0f * 2.0f;

        //太陽の処理
        sunCtrl.Move(add);

        //残り時間が半分なら
        if (time.GetToSeconds() > time.GetToInitSeconds() / 2.0f)
        {
            return;
        }

        //月の処理
        moonCtrl.Move(add);
    }