本文整理汇总了C#中Server.Engines.CannedEvil.ChampionSpawn.MoveToWorld方法的典型用法代码示例。如果您正苦于以下问题:C# ChampionSpawn.MoveToWorld方法的具体用法?C# ChampionSpawn.MoveToWorld怎么用?C# ChampionSpawn.MoveToWorld使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Server.Engines.CannedEvil.ChampionSpawn
的用法示例。
在下文中一共展示了ChampionSpawn.MoveToWorld方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: CreateAltar
private ChampionSpawn CreateAltar( SpawnRecord r, Map m, bool restartdisable )
{
ChampionSpawn cs = new ChampionSpawn();
Point3D loc = new Point3D( r.x, r.y, r.z );
if ( r.type == 0xff )
{
cs.RandomizeType = true;
switch ( Utility.Random( 5 ) )
{
case 0: cs.Type = ChampionSpawnType.VerminHorde; break;
case 1: cs.Type = ChampionSpawnType.UnholyTerror; break;
case 2: cs.Type = ChampionSpawnType.ColdBlood; break;
case 3: cs.Type = ChampionSpawnType.Abyss; break;
case 4: cs.Type = ChampionSpawnType.Arachnid; break;
}
}
else
{
cs.RandomizeType = false;
cs.Type = (ChampionSpawnType)r.type;
}
// Prevent autorestart of felucca & t2a the spawns
if ( restartdisable )
cs.RestartDelay = TimeSpan.FromDays( 9999 );
cs.MoveToWorld( loc, m );
return cs;
}
示例2: Initialize
public static void Initialize()
{
CommandSystem.Register("ChampionInfo", AccessLevel.GameMaster, new CommandEventHandler(ChampionInfo_OnCommand));
if (!m_Enabled)
{
foreach (ChampionSpawn s in m_AllSpawns)
{
s.Delete();
}
m_Initialized = false;
return;
}
m_Timer = new InternalTimer();
if (m_Initialized)
return;
Utility.PushColor(ConsoleColor.White);
Console.WriteLine("Generating Champion Spawns");
Utility.PopColor();
ChampionSpawn spawn;
XmlDocument doc = new XmlDocument();
doc.Load(m_ConfigPath);
foreach (XmlNode node in doc.GetElementsByTagName("championSystem")[0].ChildNodes)
{
if (node.Name.Equals("spawn"))
{
spawn = new ChampionSpawn();
spawn.SpawnName = GetAttr(node, "name", "Unamed Spawner");
string value = GetAttr(node, "type", null);
if(value == null)
spawn.RandomizeType = true;
else
spawn.Type = (ChampionSpawnType)Enum.Parse(typeof(ChampionSpawnType), value);
value = GetAttr(node, "spawnMod", "1.0");
spawn.SpawnMod = double.Parse(value);
value = GetAttr(node, "killsMod", "1.0");
spawn.KillsMod = double.Parse(value);
foreach(XmlNode child in node.ChildNodes)
{
if (child.Name.Equals("location"))
{
int x = int.Parse(GetAttr(child, "x", "0"));
int y = int.Parse(GetAttr(child, "y", "0"));
int z = int.Parse(GetAttr(child, "z", "0"));
int r = int.Parse(GetAttr(child, "radius", "0"));
string mapName = GetAttr(child, "map", "Felucca");
Map map = Map.Parse(mapName);
spawn.SpawnRadius = r;
spawn.MoveToWorld(new Point3D(x, y, z), map);
}
}
spawn.GroupName = GetAttr(node, "group", null);
m_AllSpawns.Add(spawn);
}
}
Rotate();
m_Initialized = true;
}