Esempio n. 1
0
        public override void OnHit(GameObject obj)
        {
            if (obj.GetType() == typeof(SimpleBulet))
            {
                if(obj.Hp > 0)
                {
                    var ite = obj as SimpleBulet;
                    ite.Hp = 0;
                    Hp = Hp - 1;
                }
            }
            if (obj.GetType() == typeof(SimpleShip))
            {
                if (obj.Hp > 0)
                {
                    var ite = obj as SimpleShip;
                    ite.Hp = 0;
                    Hp = 0;
                }
            }
            if(obj.GetType() == typeof(SimpleShield))
            {
                var ite = obj as SimpleShield;

            }
        }