本文整理汇总了C#中Enemy.Init方法的典型用法代码示例。如果您正苦于以下问题:C# Enemy.Init方法的具体用法?C# Enemy.Init怎么用?C# Enemy.Init使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Enemy
的用法示例。
在下文中一共展示了Enemy.Init方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: OnceShoot
protected void OnceShoot ()
{
m_Rocket = Enemy_Pool_Manager.sInstance.GetFreeEnemyPool(Enemy_Pool_Manager.Enemy_ID.Rocket);
m_Rocket.transform.position = arrayStartPosition[m_Index].transform.position;
m_Rocket.Init();
m_Index++;
}
示例2: Init
public static void Init(ContentManager Content)
{
difficulty = GameDifficulty.Easy; //DEFAULT AT THE MOMENT
enemy.Load(Content);
Enemy temp = new Enemy();
temp.Init();
temp.Load(Content);
e.Add(temp);
wire.Clear();
Wire w1 = new Wire();
w1.Init(new Vector2(0, 650));
w1.Load(Content);
wire.Add(w1);
Wire w2 = new Wire();
w2.Init(new Vector2(0, 610));
w2.Load(Content);
wire.Add(w2);
Wire w3 = new Wire();
w3.Init(new Vector2(0, 570));
w3.Load(Content);
wire.Add(w3);
gameState = GameState.menu;
UserInt.UIInitialise();
}
示例3: AddEnemy
float AddEnemy(Enemy enemy)
{
enemy.Init(_enemyData);
_startVector = new Vector2(0f, 55f);
var clone = (GameObject)Instantiate(Resources.Load("Enemies/" + enemy.Name), _startVector, Quaternion.identity);
//AddDebugInfo(clone);
var pathToFollow = new List<KeyValuePair<Vector3, Vector3>>()
{
AddBezierPath(new Vector2(70, 45)),
AddBezierPath(new Vector2(-70, 0)),
AddBezierPath(new Vector2(70, -23)),
};
// Add Behaviors
clone.AddComponent<Behaviors.Enemy>().Init(enemy);
clone.GetComponent<Behaviors.Enemy>().Paths = CreateBezierArrayFromList(pathToFollow);
clone.GetComponentInChildren<MeshRenderer>().material.SetColor("_Color", Colors.GetColorById(enemy.ColorId));
clone.AddComponent<BulletFactory>().Init(enemy.Weapons, true);
return _spawnInterval;
}
示例4: Shoot
protected override void Shoot ()
{
m_Rocket = Enemy_Pool_Manager.sInstance.GetFreeEnemyPool(Enemy_Pool_Manager.Enemy_ID.Rocket);
m_Rocket.transform.position = transform.position;
m_Rocket.Init();
}