当前位置: 首页>>代码示例>>C#>>正文


C# Enemy.getID方法代码示例

本文整理汇总了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);
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:27,代码来源:Skill_GAMORA30B.cs

示例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;
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:22,代码来源:Skill_GROOT5B.cs


注:本文中的Enemy.getID方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。