using System.Collections; using System.Collections.Generic; using UnityEngine; public class Bullet : MonoBehaviour { void OnCollisionEnter2D (Collision2D collision) { if (normalE.tag == "normalEnemyTag") { currentScore + normalEnemy; } if (eliteE.tag == "eliteEnemyTag") { currentScore + eliteEnemy; } Destroy(collision.collider.gameObject); Destroy(gameObject); } }
using System.Collections; using System.Collections.Generic; using UnityEngine; public class Bullet : MonoBehaviour { void OnCollisionEnter2D (Collision2D collision) { if (normalE.tag == "normalEnemyTag") { currentScore + normalEnemy; } else { currentScore + eliteEnemy; } Destroy(collision.collider.gameObject); Destroy(gameObject); } }
currentScore +
C++
Quote:currentScore + normalEnemy;
currentScore += normalEnemy;
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)