// Create a reference set of entities and load necessary assets. public override void Preload(Entity root) { this.root = root; actorList = new List <Entity>(); player = new Entity() .AddRenderComponent(new SpriteComponent(GlobalServices.GlobalSprites.Register("higantour:spirit4"))) .AddChainComponent("control", new Components.PlayerControlComponent(this)); //.AddChainComponent("motion", ) /* * new Entity(0, 0) * .AddRenderComponent(new TextComponent(GlobalServices.GlobalFonts.Register("higantour:sans"), "Player 1")) * .AttachTo(player); */ enemy = new Entity() .AddRenderComponent(new SpriteComponent(GlobalServices.GlobalSprites.Register("higantour:fairy_sm"))) .AddChainComponent("control", new Components.AI.SeekerAIComponent(this)); GlobalServices.GlobalSprites.Register("higantour:enemy"); death = new Entity() .AddRenderComponent(new SpriteComponent(GlobalServices.GlobalSprites.Register("higantour:death_sm"))); warning = new Entity() .AddRenderComponent(new SpriteComponent(GlobalServices.GlobalSprites.Register("higantour:fae_warn"))); bullet = new Entity() .AddRenderComponent(new SpriteComponent(GlobalServices.GlobalSprites.Register("higantour:bullet"))) .AddChainComponent("control", new Components.AI.BulletComponent(this, -200, 0, 0, 0)); Sprite lycorisSprite = GlobalServices.GlobalSprites.Register("higantour:redlily"); lycoris = new Entity() .AddRenderComponent(new SpriteComponent(lycorisSprite)); font = GlobalServices.GlobalFonts.Register("higantour:sans"); // bgm = GlobalServices.GlobalSongs.Register("higantour:Stage"); PlayerSfx = GlobalServices.GlobalSoundEffects.Register("higantour:leaves"); PlayerSfxInstance = PlayerSfx.CreateInstance(); }