Esempio n. 1
0
        public void Kill(HarmfulObject _obj)
        {
            Lives = 0;

            Dead.SetValue(true);
            DeathMessage.SetValue(_obj.GetMessage());
            m_Body.bodyType = RigidbodyType2D.Static;
        }
Esempio n. 2
0
        public void Damage(HarmfulObject _obj)
        {
            int damage = _obj.GetDamage();

            Lives -= damage;

            if (Lives <= float.Epsilon)
            {
                Kill(_obj);
            }
        }
Esempio n. 3
0
 // Use this for initialization
 void Start()
 {
     collider = GetComponent <BoxCollider2D>();
     CalculateRaySpacing();
     harmfulObject = GetComponent <HarmfulObject>();
 }