本文整理汇总了C#中Artemis.EntityWorld.CreateShip方法的典型用法代码示例。如果您正苦于以下问题:C# EntityWorld.CreateShip方法的具体用法?C# EntityWorld.CreateShip怎么用?C# EntityWorld.CreateShip使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Artemis.EntityWorld
的用法示例。
在下文中一共展示了EntityWorld.CreateShip方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Intro
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;
}