// Use this for initialization void Awake() { if (instance == null) { instance = this; } }
void Start() { loadPrefab = LoadPrefabInGame.instance; // Only enemy have health bar if (gameObject.tag != "Player") { activeHealthBar = transform.GetChild(0); } normalMaterial = gameObject.GetComponent <SpriteRenderer>().material; }