本文整理汇总了C#中Score.Initialize方法的典型用法代码示例。如果您正苦于以下问题:C# Score.Initialize方法的具体用法?C# Score.Initialize怎么用?C# Score.Initialize使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Score
的用法示例。
在下文中一共展示了Score.Initialize方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReloadLevel
void ReloadLevel()
{
if (scene != null)
{
SetLevelState();
scene.UnloadContent();
withChicks.UnloadContent();
}
//if (blank != null)
{
blank = null;
LowerFlag(Jabber.Flags.FADE_OUT);
}
IsQuitting = false;
Components.Clear();
world = new FarWorld();
world.Initialize(new Vector2(0, -15.0f));
world.SimulationSpeedFactor = 1.0f;
withChicks = new ChicksScene(this, world, Content);
withChicks.DoWorldUpdateDraw = false;
// withChicks.AddNode(cannon);
scene = new ThisGamesScene(this, world, withChicks, Content);
scene.DoWorldUpdateDraw = false;
scene.AddTextureLoadInterceptor("textures\\Physical\\wood", "break", "break_frames", "wood");
scene.AddTextureLoadInterceptor("textures\\Physical\\cement", "break", "break_frames", "cement");
scene.AddTextureLoadInterceptor("textures\\Physical\\glass", "break", "break_frames", "glass");
scene.AddTextureLoadInterceptor("textures\\Backgrounds\\Bavaria\\cowright", "textures/backgrounds/bavaria/bavaria", "textures/backgrounds/bavaria/bavaria_frames", "cowleft");
scene.AddTextureLoadInterceptor("textures\\Backgrounds\\Bavaria\\cowleft", "textures/backgrounds/bavaria/bavaria", "textures/backgrounds/bavaria/bavaria_frames", "cowright");
LevelDir = "Content/Levels/" + location + "/Level" + levelNum + ".xml";
scene.LoadGScene(LevelDir);
withChicks.startPos = scene.startPos;
ChickenDrawer chickdrawer = new ChickenDrawer(withChicks, scene);
chickdrawer.Initialize(Content);
scene.AddNode(chickdrawer);
ChickenBience bience = new ChickenBience(this);
bience.Initialize(Content);
bience.Position = scene.startPos;
scene.AddNode(bience);
cannon = new Cannon(this);
cannon.Position = scene.startPos;
cannon.Initialize(Content);
scene.AddNode(cannon);
//scene.AddNode(cannon);
if (withChicks.GetRightMaxPos() > scene.GetRightMaxPos())
{
rightMostPos = withChicks.GetRightMaxPos() + 200.0f;
}
else
{
rightMostPos = scene.GetRightMaxPos() + 200.0f;
}
leftMostPos = scene.startPos.X - 500;
/// rightMostPos = 10000000;
world.SetCollisionForAll(Fox.FOX_NONE_COLLISION_GROUP, false);
world.SetCollisionForAll(BreakableBody.BodyNoneCollisionGroup, false);
string country = scene.countryName;
//scene.ToFire.Clear();
if (scene.ToFire.Count == 0)
for (int i = 0; i < 4; i++)
{
scene.ToFire.Add(0);
}
//GameScene worldLoc = new GameScene(world, Content);
//WorldLocation.CreateVesuvius(scene, (int)leftMostPos, (int)rightMostPos);
// WorldLocation.CreatePolar(scene, (int)leftMostPos, (int)rightMostPos);
switch (scene.countryName)
{
case "bavaria":
WorldLocation.CreateBavaria(scene, (int)leftMostPos, (int)rightMostPos);
break;
case "paris":
WorldLocation.CreateParis(scene, (int)leftMostPos, (int)rightMostPos);
break;
case "australia":
WorldLocation.CreateAustralia(scene, (int)leftMostPos, (int)rightMostPos);
break;
case "polar":
WorldLocation.CreatePolar(scene, (int)leftMostPos, (int)rightMostPos);
break;
case "vesuvius":
WorldLocation.CreateVesuvius(scene, (int)leftMostPos, (int)rightMostPos);
break;
}
//.........这里部分代码省略.........