public BonbonPickup() { BodyComponent = new BodyComponent(this) { InitMode = BodyComponentInitMode.Manual, }; BodyComponent.BeforeInitialize += () => { }; this.RootComponent = BodyComponent; Animation = new SpriteAnimationComponent(this) { AnimationTypes = new List <SpriteAnimationType>(), }; Animation.AttachTo(RootComponent); MoneyBag = new MoneyBagComponent(this) { InitialAmount = 10, }; Homing = GameObjectFactory.CreateDefaultHomingCircle(this, BodyComponent, sensorRadius: 1.0f, homingType: HomingType.ConstantSpeed, homingSpeed: 3.0f); Pickup = new PickupComponent(this) { BodyComponent = BodyComponent, }; }
public KeyPickup() { BodyComponent = new BodyComponent(this) { InitMode = BodyComponentInitMode.Manual, }; this.RootComponent = BodyComponent; Animation = new SpriteAnimationComponent(this) { AnimationTypes = new List <SpriteAnimationType>(), }; Animation.AttachTo(RootComponent); KeyRing = new KeyRingComponent(this); Pickup = new PickupComponent(this) { BodyComponent = BodyComponent, }; Homing = GameObjectFactory.CreateDefaultHomingCircle(this, BodyComponent, sensorRadius: 1.0f, homingType: HomingType.ConstantSpeed, homingSpeed: 3.0f); }