Beispiel #1
0
 // Update is called once per frame
 void Update()
 {
     if (health <= 0)
     {
         health = maxHealth;
         血条.ChangeTo(1);
         gs.GameOver(false);
     }
     timer++;
     if (timer >= reloadFrames)
     {
         Reload();
     }
 }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        float f = seconds / gs.secondsInADay;

        时间条.localScale = new Vector3(f, 1, 1);
        x = cRx - 360 * f;
        while (x < -180)
        {
            x += 180;
        }
        while (x > 0)
        {
            x -= 180;
        }
        transform.rotation    = Quaternion.Euler(x, 0, 0);
        seconds              += Time.deltaTime;
        b.bloomThresholdColor = oc * (1 - f) + target * f;
        if (seconds >= gs.secondsInADay)
        {
            gs.GameOver(true);
        }
    }