예제 #1
0
파일: Enemy.cs 프로젝트: YLardenoije/NAAM
 // Start is called before the first frame update
 void Start()
 {
     livingThing = gameObject.GetComponent <LivingThing>();
     livingThing.OnDeathEvent.AddListener(OnDeath);
     Rend        = gameObject.GetComponent <Renderer>();
     AttackTimer = 0;
     player      = GlobalData.GetPlayerAndAddListener(this);
     if (player != null)
     {
         player.livingThing.OnDeathEvent.AddListener(PlayerDied);
     }
     GlobalData.AddEnemy(this);
 }