Exemple #1
0
    public override void receiveHit(Hitable objHit)
    {
        base.receiveHit(objHit);
        switch (objHit.objType)
        {
        case HitObjType.Spawn_Drone:
            if (SpawnDrone())
            {
                objHit.Consume();
            }
            break;

        case HitObjType.Health:
            if (HealthPickup(objHit))
            {
                objHit.Consume();
            }
            break;

        case HitObjType.FixedBlock:
            DamagePickup(objHit);
            break;

        case HitObjType.DamageBlock:
            if (DamagePickup(objHit))
            {
                objHit.Consume();
            }
            break;

        case HitObjType.Slow:
            if (SlowPickup(objHit))
            {
                objHit.Consume();
            }
            break;

        case HitObjType.Hive:
            EndRound();
            break;
        }
    }