本文整理汇总了C#中ParticleEmitter.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# ParticleEmitter.Initialize方法的具体用法?C# ParticleEmitter.Initialize怎么用?C# ParticleEmitter.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类ParticleEmitter
的用法示例。
在下文中一共展示了ParticleEmitter.Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadContent
protected override void LoadContent()
{
spriteBatch = new SpriteBatch(GraphicsDevice);
Services.AddService(typeof(SpriteBatch), spriteBatch);
font = Content.Load<SpriteFont>("Sprites/arial");
bigFont = Content.Load<SpriteFont>("Sprites/big");
box = Content.Load<Model>("Models/box");
(box.Meshes[0].Effects[0] as BasicEffect).EnableDefaultLighting();
treeModel = Content.Load<Model>("Models/tree");
(treeModel.Meshes[0].MeshParts[0].Effect as BasicEffect).EnableDefaultLighting();
textureBuilding = Content.Load<Texture2D>("Texture/Building_texture3");
/*effect.TextureEnabled = true;
effect.Texture = textureBuilding;*/
ElevatortMusic = Content.Load<Song>("Audio\\elevatorMusic");
ElevatorBell = Content.Load<Song>("Audio\\ElevatorBell");
#region Player
player = new Entity(this, box);
player.Position = new Vector3(0, 120, 0);
player.Controller = new KeyboardController(player);
player.Scale = new Vector3(0.01f, 0.02f, 0.01f);
player.Gravity = true;
player.Color = Color.Purple;
#endregion
#region floor
floor = new Entity(this, box);
floor.Scale = new Vector3(0.99f, 0.5f, 0.99f);
floor.Position = new Vector3(0, -50, 0);
#endregion
#region walls
Entity wall = new Entity(this, box);
wall.Position = new Vector3(100, 450, 0);
wall.Scale = new Vector3(0.02f, 5, 1);
wall.Texture = textureBuilding;
Entity wall2 = new Entity(this, box);
wall2.Position = new Vector3(0, 450, 100);
wall2.Scale = new Vector3(1, 5, 0.02f);
wall2.Texture = textureBuilding;
Entity wall3 = new Entity(this, box);
wall3.Position = new Vector3(0, 450, -100);
wall3.Scale = new Vector3(1, 5, 0.02f);
wall3.Texture = textureBuilding;
Entity wall4 = new Entity(this, box);
wall4.Position = new Vector3(-100, 500, 20);
wall4.Scale = new Vector3(0.02f, 4.5f, 0.8f);
wall4.Texture = textureBuilding;
#endregion
#region elevator
elevator = new Entity(this, box);
elevator.Color = Color.LimeGreen;
elevator.Scale = new Vector3(0.2f, 0.02f, 0.2f);
elevator.Position = new Vector3(-120, 0, -80);
#endregion
#region Tree model
Entity tree = new Entity(this, treeModel);
tree.Scale = new Vector3(0.15f);
tree.Position = new Vector3(50, 10, 50);
Entity tree2 = new Entity(this, treeModel);
tree2.Scale = new Vector3(0.17f);
tree2.Position = new Vector3(30, 5, 40);
Entity tree3 = new Entity(this, treeModel);
tree3.Scale = new Vector3(0.2f);
tree3.Position = new Vector3(40, 5, 10);
#endregion
#region Skydome and Terrain
Terrain terrain = new Terrain(this);
terrain.Initialize();
SkyDome skyDome = new SkyDome(this);
skyDome.Initialize();
#endregion
#region ShaftWall(elevator shaft)
Entity shaftWall1 = new Entity(this, box);
shaftWall1.Position = new Vector3(-121, 450, -100);
shaftWall1.Scale = new Vector3(0.21f, 5, 0.02f);
//shaftWall1.Texture = Content.Load<Texture2D>("trans");
Entity shaftWall2 = new Entity(this, box);
shaftWall2.Position = new Vector3(-121, 450, -60);
shaftWall2.Scale = new Vector3(0.21f, 5, 0.02f);
//shaftWall2.Texture = Content.Load<Texture2D>("trans");
shaftWall1.Alpha = 0.5f;
shaftWall2.Alpha = 0.5f;
#endregion
staticEntities.Add(shaftWall1);
staticEntities.Add(shaftWall2);
floors = new Entity[20];
doors = new ElevatorDoors[20];
floorNumbers = new BoundingBox[20];
elevatorFronts = new BoundingBox[20];
for (int i = 0; i < floors.Length; i++)
{
//.........这里部分代码省略.........