本文整理汇总了C#中Creature.Create方法的典型用法代码示例。如果您正苦于以下问题:C# Creature.Create方法的具体用法?C# Creature.Create怎么用?C# Creature.Create使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Creature
的用法示例。
在下文中一共展示了Creature.Create方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: SetupFightCtller
void SetupFightCtller()
{
//ResMgr.Instance.CreateGameObject("BG/BG01", gameObject);
m_fc = new FightCtller();
m_fc.Create();
GameObject ctl = Util.NewGameObject("FCtller", RootSprite);
m_fcv = ctl.AddComponent<FightCtllerView>();
m_fcv.Create(m_fc);
string[] keys = null;
Int2D[] pts = null;
keys = new string[] { "M01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01" };
pts = new Int2D[] { new Int2D(0, 0), new Int2D(2, 0), new Int2D(3, 0), new Int2D(4, 0), new Int2D(0, 1), new Int2D(1, 1), new Int2D(2, 1), new Int2D(3, 1), new Int2D(4, 1), new Int2D(0, 2), new Int2D(1, 2), new Int2D(2, 2), new Int2D(3, 2), new Int2D(4, 2)};
for (int p = 0; p < keys.Length; ++ p)
{
string k = keys[p];
InfoCreature info = new InfoCreature(ProtoMgr.Instance.GetByKey<ProtoCreature>(k));
Creature ac = new Creature();
ac.Create(info);
m_fc.FGrids[0].AddCreature(ac, pts[p]);
}
keys = new string[] { "M01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01", "N01" };
pts = new Int2D[] { new Int2D(0, 0), new Int2D(2, 0), new Int2D(3, 0), new Int2D(4, 0), new Int2D(0, 1), new Int2D(1, 1), new Int2D(2, 1), new Int2D(3, 1), new Int2D(4, 1), new Int2D(0, 2), new Int2D(1, 2), new Int2D(2, 2), new Int2D(3, 2), new Int2D(4, 2) };
for (int p = 0; p < keys.Length; ++p)
{
string k = keys[p];
InfoCreature info = new InfoCreature(ProtoMgr.Instance.GetByKey<ProtoCreature>(k));
//info.Guns = new InfoGun[info.Proto.Guns.Length];
//for (int i = 0; i < info.Guns.Length; ++i)
//{
// info.Guns[i] = new InfoGun(info.Proto.ProtoGuns[i]);
//}
Creature ac = new Creature();
ac.Create(info);
m_fc.FGrids[1].AddCreature(ac, pts[p]);
}
m_fc.Fight();
}