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


C# Character.getID方法代码示例

本文整理汇总了C#中Character.getID方法的典型用法代码示例。如果您正苦于以下问题:C# Character.getID方法的具体用法?C# Character.getID怎么用?C# Character.getID使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Character的用法示例。


在下文中一共展示了Character.getID方法的6个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: DestroySkillEft

    public void DestroySkillEft(State state, Character character)
    {
        //		character.removeHandlerFromParmlessHandlerByParam(Character.ParmlessHandlerFunNameEnum.OnDestroySkillEftObj, DestroySkillEft);

        GameObject skillEft_MANTIS15B_Damage = damageEftHash[character.getID()] as GameObject;
        Destroy(skillEft_MANTIS15B_Damage);

        damageEftHash.Remove(character.getID());
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:9,代码来源:Skill_MANTIS15B.cs

示例2: DestroySkillEft

    public void DestroySkillEft(State state, Character charater)
    {
        //		charater.removeHandlerFromParmlessHandlerByParam(Character.ParmlessHandlerFunNameEnum.OnDestroySkillEftObj, DestroySkillEft);

        int index = (int)targets[charater.getID()];
        for (int i=index; i<index+2; i++){
            GameObject obj = effects[i];
            Destroy(obj);
            effects[i] = null;
        }
        targets.Remove(charater.getID());

        if (0 == targets.Count){
            effects.Clear();
        }
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:16,代码来源:Skill_GAMORA30B.cs

示例3: DesSkillEft

    public void DesSkillEft(Character character)
    {
        if(this.branchHash.Count <= 0)
        {
            return;
        }

        List<PackedSprite> branchList = this.branchHash[character.getID()] as List<PackedSprite>;

        if(branchList == null || branchList.Count <= 0)
        {
            return;
        }

        foreach(PackedSprite branch in branchList)
        {
                branch.animations[branch.defaultAnim].onAnimEnd = UVAnimation.ANIM_END_ACTION.Destroy;
                branch.PlayAnimInReverse(0);
        }

        this.branchHash.Remove(character.getID());
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:22,代码来源:Skill_GROOT5B.cs

示例4: dropAtkPosition

 public virtual void dropAtkPosition(Character atker)
 {
     for (int i=0; i<atkPosAry.Count; i++)
     {
         if (atkPosAry [i].ToString () == atker.getID ())
         {
             atkPosAry [i] = "0";
         }
     }
 }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:10,代码来源:Character.cs

示例5: getAtkPosition

    public virtual Vector3 getAtkPosition(Character atker)
    {
        this.dropAtkPosition (atker);
        List<Vector3> predefinedPos = new List<Vector3> ();
        predefinedPos.Add (gameObject.transform.position + new Vector3 (atker.data.attackRange*(-.6f) 	, 40, 0));
        predefinedPos.Add (gameObject.transform.position + new Vector3 (atker.data.attackRange*(-1f)	, 0, 0));
        predefinedPos.Add (gameObject.transform.position + new Vector3 (atker.data.attackRange*(-.8f) 	, -40, 0));

        predefinedPos.Add (gameObject.transform.position + new Vector3 (atker.data.attackRange*(.6f)	, 40, 0));
        predefinedPos.Add (gameObject.transform.position + new Vector3 (atker.data.attackRange			, 0, 0));
        predefinedPos.Add (gameObject.transform.position + new Vector3 (atker.data.attackRange*(.8f)	, -40, 0));

        float nearestDist = float.MaxValue;
        int nearestIndex = -1;
        //round one
        for (int i=0; i<predefinedPos.Count; i++)
        {
            if (this.atkPosAry [i].ToString () == "0" &&
                !BattleBg.IsOutOfActionBounce (predefinedPos [i]) &&
                (BarrierMapData.Enable && BarrierMapData.Instance.IsThePositionValid(predefinedPos [i]) ||
                !BarrierMapData.Enable))
            {
                float dist = Vector3.Distance (predefinedPos [i], atker.transform.position);
                if (dist < nearestDist)
                {
                    nearestDist = dist;
                    nearestIndex = i;
                }
            }
        }
        //round two
        if (nearestIndex == -1)
        {
            for (int i=0; i<predefinedPos.Count; i++)
            {
                // if (atkPosAry [i].ToString () == "0" ) {
                if (BarrierMapData.Enable && BarrierMapData.Instance.IsThePositionValid(predefinedPos [i]) ||
                    !BarrierMapData.Enable && this.atkPosAry [i].ToString () == "0")
                {
                    float dist = Vector3.Distance (predefinedPos [i], atker.transform.position);
                    if (dist < nearestDist)
                    {
                        nearestDist = dist;
                        nearestIndex = i;
                    }
                }
            }
        }

        if(nearestIndex == -1)
        {
            Debug.LogError("not found a good postion to attack,use No.1");
            nearestIndex = 0;
        }
        this.atkPosAry[nearestIndex] = atker.getID();
        Vector3 v = predefinedPos[nearestIndex];

        int minX = (int)BattleBg.actionBounds.min.x;
        int maxX = (int)BattleBg.actionBounds.max.x;
        int minY = (int)BattleBg.actionBounds.min.y;
        int maxY = (int)BattleBg.actionBounds.max.y;

        if (v.x < minX )
            v.x = minX + 10;
        if (v.y < minY )
            v.y = minY + 10;
        if (v.x > maxX)
            v.x = maxX - 10;
        if (v.y > maxY)
            v.y = maxY - 10;

        return v;
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:73,代码来源:Character.cs

示例6: ShowEnemyOnFireEft

    private void ShowEnemyOnFireEft(Character enemy)
    {
        //		enemy.addHandlerToParmlessHandlerByParam(Character.ParmlessHandlerFunNameEnum.OnDestroySkillEftObj, DestroySkillEft);

        if(SkillEft_STARLOAD1_FireBlast_Prb == null)
        {
            SkillEft_STARLOAD1_FireBlast_Prb = Resources.Load("eft/StarLord/30A_FireStrom/StarLord30A_FireStorm_Fire") as GameObject;
        }

        GameObject front = Instantiate(SkillEft_STARLOAD1_FireBlast_Prb) as GameObject;
        front.transform.parent = enemy.transform;
        front.transform.localPosition = new Vector3(0,600,-15);

        GameObject behind = Instantiate(SkillEft_STARLOAD1_FireBlast_Prb) as GameObject;
        behind.transform.parent = enemy.transform;
        behind.transform.localPosition = new Vector3(0,600,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,代码行数:29,代码来源:Skill_STARLORD30A.cs


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