コード例 #1
0
ファイル: Bee.cs プロジェクト: grollapps/LD40
    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;
        }
    }