コード例 #1
0
    // Update is called once per frame
    void Update()
    {
        if (!onStart)
        {
            BlinkLightIfLow();
        }

        else if (onStart && controller.AmmoCount() != 0)
        {
            onStart = false;
        }
    }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     if (!setInitial)
     {
         counterDigits.SetDoubleNumber(playerGunController.magazineSize);
         maxDigits.SetDoubleNumber(playerGunController.magazineSize);
         prevAmmoCount = 0;
         setInitial    = true;
     }
     if (playerGunController.AmmoCount() != prevAmmoCount)
     {
         //ammoCountText.text = playerGunController.AmmoCount() + "/" + playerGunController.magazineSize;
         counterDigits.SetDoubleNumber(playerGunController.AmmoCount());
         prevAmmoCount = playerGunController.AmmoCount();
     }
 }