Пример #1
0
        private IEnumerable Intro(Story story, EntityWorld world)
        {
            var bgGenerator = ServiceLocator.Instance.GetService<SpaceBackgroundGeneratorService>();
            bgGenerator.GenerateBackground(world, 12345);

            var entity = world.CreateStoryOverlay(Properties.Resources.String_ActOne_Intro01);

            yield return Coroutine.WaitFor(TimeSpan.FromSeconds(2));
            entity.FadeGuiElement(TimeSpan.FromSeconds(1.5), 0)
                .OnDone = () => entity.Delete();
            yield return Coroutine.WaitFor(TimeSpan.FromSeconds(2));

            var variant = new ShipVariant
            {
                HullId = "Jormugand",
                TrimDecalColor = Color.Cyan,
                BaseDecalColor = new Color(212, 113, 108),
            };
            _playerEntity = world.CreateShip(variant, new Vector2(500,0),0, physics:true);
            _playerEntity.Tag = "PlayerShip";
            _playerEntity.Refresh();
            var cameraControl = world.SystemManager.GetSystem<Systems.CameraControlSystem>();
            cameraControl.Mode = Systems.CameraMode.FollowEntity;
            cameraControl.FollowedEntity = _playerEntity;

            var test = world.CreateShip("mobius", new Vector2(0, 0), MathHelper.Pi * 1.5f, physics:true);
            test.GetComponent<ShipModelComponent>().BaseDecalColor = Color.Khaki;

            story.State.Fire(Story.Triggers.NextScene);
            yield return null;
        }
Пример #2
0
 public override void LoadContent()
 {
     Story = new Story(EntityWorld);
     base.LoadContent();
 }
Пример #3
0
 private IEnumerable Tutorial(Story story, EntityWorld world)
 {
     var entity = world.CreateStoryOverlay(Properties.Resources.String_ActOne_Tutorial01,"");
     yield return Coroutine.WaitFor(TimeSpan.FromSeconds(2));
     entity.FadeGuiElement(TimeSpan.FromSeconds(1.5), 0)
         .OnDone = () => entity.Delete();
     yield return Coroutine.WaitFor(TimeSpan.FromSeconds(2));
     story.State.Fire(Story.Triggers.NextScene);
 }
Пример #4
0
 private IEnumerable AlienInvasionIntro(Story story, EntityWorld world)
 {
     yield return null;
 }
Пример #5
0
 public IEnumerable Master(Story story, EntityWorld world)
 {
     story.State.Fire(Triggers.Start);
     yield return null;
 }
Пример #6
0
 private IEnumerable EndOfStory(Story story, EntityWorld world)
 {
     yield break;
 }