本文整理汇总了C#中Enemy.getID方法的典型用法代码示例。如果您正苦于以下问题:C# Enemy.getID方法的具体用法?C# Enemy.getID怎么用?C# Enemy.getID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Enemy
的用法示例。
在下文中一共展示了Enemy.getID方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ShowEffect
public void ShowEffect(Enemy enemy)
{
if(Effectt_Prb == null)
{
Effectt_Prb = Resources.Load("eft/Gamora/SkillEft_GAMORA30AB") as GameObject;
}
GameObject front = Instantiate(Effectt_Prb) as GameObject;
front.transform.parent = enemy.transform;
front.transform.localPosition = new Vector3(0,500,-15);
GameObject behind = Instantiate(Effectt_Prb) as GameObject;
behind.transform.parent = enemy.transform;
behind.transform.localPosition = new Vector3(0,500,100);
effects.Add(front);
effects.Add(behind);
if (targets.ContainsKey(enemy.getID())){
targets[enemy.getID()] = effects.Count-2;
}
else{
targets.Add(enemy.getID(), effects.Count-2);
}
PackedSprite ps = front.GetComponent<PackedSprite>();
ps.Color = new Color(ps.Color.r, ps.Color.g,ps.Color.b,0.5f);
}
示例2: showEft
public void showEft(Enemy enemy)
{
GameObject branchFront = Instantiate(branchFrontPrb) as GameObject;
GameObject branchBehind = Instantiate(branchBehindPrb) as GameObject;
float s = 1.5f;
Vector3 scale = new Vector3(s,s,s);
branchFront.transform.parent = enemy.transform;
branchFront.transform.localPosition = new Vector3(0, enemy.model.transform.localPosition.y, -1);
branchFront.transform.localScale = scale;
branchBehind.transform.parent = enemy.transform;
branchBehind.transform.localPosition = new Vector3(0, enemy.model.transform.localPosition.y, 0);;
branchBehind.transform.localScale = scale;
List<PackedSprite> branchList = new List<PackedSprite>();
branchList.Add(branchFront.GetComponent<PackedSprite>());
branchList.Add(branchBehind.GetComponent<PackedSprite>());
this.branchHash[enemy.getID()] = branchList;
}