Example #1
0
        public override void Initialize(Section owner)
        {
            base.Initialize(owner);
            graphics = (ComplexGraphicsObject)ContentPackageManager.GetGraphicsResource("SMBBuzzyBeetle");

            HealthComponent health = new HealthComponent(1, 1, new string[] { SpriteDamageTypes.PlayerFireball, SpriteDamageTypes.PlayerStomp });
            health.SpriteKilled += Health_SpriteKilled;

            SpriteDirection initialDirection = ResolveDirection(this, Direction, Owner);
            facingDirection = (initialDirection == SpriteDirection.Left) ? SMLimitless.Direction.Left : SMLimitless.Direction.Right;
            Components.Add(health);
            Components.Add(new WalkerComponent(this, initialDirection, WalkingSpeed.Value));
            Components.Add(new DamageComponent());
            Components.Add(new ChasePlayerComponent(this, 60));

            ShelledEnemyComponent shelledEnemy = new ShelledEnemyComponent(this, WalkingSpeed.Value, ShellSpinningSpeed.Value, FramesUntilBeginEmerge.Value, FramesUntilEmerge.Value);
            shelledEnemy.StateChanged += ShelledEnemy_StateChanged;
            Components.Add(shelledEnemy);
        }
Example #2
0
        public override void Initialize(Section owner)
        {
            base.Initialize(owner);
            graphics = (ComplexGraphicsObject)ContentPackageManager.GetGraphicsResource("SMBSpiny");

            graphics.CurrentObjectName = (SpinyState == SpinyState.Spiny) ? "walking" : "egg";

            HealthComponent health = new HealthComponent(1, 1, new string[] { SpriteDamageTypes.PlayerStomp });
            health.SpriteKilled += Health_SpriteKilled;

            Components.Add(new WalkerComponent(this, ResolveDirection(this, Direction, Owner), WalkingSpeed.Value));
            Components.Add(health);
            Components.Add(new DamageComponent());
        }
Example #3
0
        public override void Initialize(Section owner)
        {
            base.Initialize(owner);
            graphics = (ComplexGraphicsObject)ContentPackageManager.GetGraphicsResource("SMBKoopaTroopa");

            graphics.CurrentObjectName = AppendTypeSuffix("walking");

            HealthComponent healthComponent = new HealthComponent(1, 1, new string[] { SpriteDamageTypes.PlayerStomp });
            healthComponent.SpriteKilled += HealthComponent_SpriteKilled;

            SpriteDirection initialDirection = ResolveDirection(this, Direction, Owner);
            facingDirection = (initialDirection == SpriteDirection.Left) ? SMLimitless.Direction.Left : SMLimitless.Direction.Right;
            Components.Add(healthComponent);
            Components.Add(new WalkerComponent(this, initialDirection, WalkingSpeed.Value));
            Components.Add(new DamageComponent());

            ChasePlayerComponent chasePlayer = new ChasePlayerComponent(this, 60);
            chasePlayer.NearestPlayerDirectionUpdated += ChasePlayer_NearestPlayerDirectionUpdated;
            Components.Add(chasePlayer);

            ShelledEnemyComponent shelledEnemy = new ShelledEnemyComponent(this, WalkingSpeed.Value, ShellSpinningSpeed.Value, FramesUntilBeginEmerge.Value, FramesUntilEmerge.Value);
            shelledEnemy.StateChanged += ShelledEnemy_StateChanged;
            Components.Add(shelledEnemy);
            SetBehavior();
        }
Example #4
0
        public override void Initialize(Section owner)
        {
            column = new PlayerSensingColumn(owner, SpawnBandStart, SpawnBandEnd);
            graphics = (ComplexGraphicsObject)ContentPackageManager.GetGraphicsResource("SMBLakitu");

            ActiveState = SpriteActiveState.AlwaysActive;
            TileCollisionMode = SpriteCollisionMode.NoCollision;

            var health = new HealthComponent(1, 1, new string[] { });
            health.SpriteKilled += Health_SpriteKilled;

            Components.Add(health);
            Components.Add(new DamageComponent());

            base.Initialize(owner);
        }
Example #5
0
        public override void Initialize(Section owner)
        {
            base.Initialize(owner);
            graphics = (ComplexGraphicsObject)ContentPackageManager.GetGraphicsResource("SMBGoomba");

            graphics.CurrentObjectName = AppendPaletteNameSuffix("walking");

            HealthComponent healthComponent = new HealthComponent(1, 1, new string[] { });
            healthComponent.SpriteKilled += HealthComponent_SpriteKilled;

            Components.Add(new WalkerComponent(this, ResolveDirection(this, Direction, owner), 32f));
            Components.Add(healthComponent);
            Components.Add(new DamageComponent());
        }