コード例 #1
0
 void OnDeath()
 {
     if (transform.position.y < -5)
     {
         //fell out of world
     }
     else
     {
         FollowCamera camera = RoadTileManager.checkpoint.FollowCamera;
         if (Vector3.Distance(transform.position, camera.target.transform.position) > camera.CullDistance)
         {
             // Culled
         }
         else if (RoadTileManager.bMainMenu)
         {
             // Main Menu screen
         }
         else
         {
             Killcount.AddKill();
             if (Killcount.GetKills() % 10 == 0)
             {
                 Currency.AddCurrency();
             }
         }
     }
 }
コード例 #2
0
 private void UpdateKillCount()
 {
     Killcount.UpdateKillcount(addValue);
 }
コード例 #3
0
 void Update()
 {
     scoreText.text = "Score: " + Killcount.GetKills() * 10;
 }
コード例 #4
0
 private void ResetKillcount()
 {
     Killcount.Reset();
 }
コード例 #5
0
 void Update()
 {
     text.text = "Zombies Killed: " + Killcount.GetKills();
 }
コード例 #6
0
 // Use this for initialization
 void Start()
 {
     Killcount.Reset();
 }