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


C# Character.toward方法代码示例

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


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

示例1: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        GameObject caller = objs[1] as GameObject;
        GameObject target = objs[2] as GameObject;

        character = caller.GetComponent<Character>();
        enemy = target.GetComponent<Character>();

        character.castSkill("Skill30A_a");
        character.toward(enemy.transform.position);
        character.attackAnimaName = "Skill30A_b";

        if(character is Nebula){
            Nebula nebula = character as Nebula;
            nebula.showSkill30AHaloEftCallBack += showHaloEft;
            nebula.showSkill30ABulletEftCallBack += showBulletEft;
        }else if(character is Ch2_Nebula){
            Ch2_Nebula nebula = character as Ch2_Nebula;
            nebula.showSkill30AHaloEftCallBack += showHaloEft;
            nebula.showSkill30ABulletEftCallBack += showBulletEft;
        }

        SkillDef skillDef = SkillLib.instance.getSkillDefBySkillID("NEBULA30A");
        int buffTime = (int)skillDef.buffDurationTime;
        int tempAtk = (int)((Effect)skillDef.activeEffectTable["atk_PHY"]).num;
        int tempAspd = (int)((Effect)skillDef.activeEffectTable["aspd"]).num;

        character.addBuff("Skill_NEBULA30A",buffTime,tempAtk,BuffTypes.ATK_PHY,buffFinish);
        character.addBuff("Skill_NEBULA30A",buffTime,tempAspd,BuffTypes.ASPD);

        yield return new WaitForSeconds(1f);

        createBgFire();
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:34,代码来源:Skill_NEBULA30A.cs

示例2: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        GameObject caller = objs[1] as GameObject;
        GameObject target = objs[2] as GameObject;

        this.charlie27 = caller.GetComponent<Character>();
        this.enemy = target.GetComponent<Character>();

        charlie27.castSkill("Skill15A");
        charlie27.toward(enemy.transform.position);

        //		if (charlie27 is Charlie27)
        //			(charlie27 as Charlie27)
        //		else
        //			(charlie27 as Ch3_Charlie27)
        if (charlie27 is Charlie27){
            (charlie27 as Charlie27).showSkill15AHitEftCallback += showHitEft;
            (charlie27 as Charlie27).showSkill15ABangEftCallback += showBangEft;
        }
        else{
            (charlie27 as Ch3_Charlie27).showSkill15AHitEftCallback += showHitEft;
            (charlie27 as Ch3_Charlie27).showSkill15ABangEftCallback += showBangEft;
        }

        yield return new WaitForSeconds(0f);
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:26,代码来源:Skill_CHARLIE2715A.cs

示例3: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        parms = objs;
        GameObject caller = parms[1] as GameObject;
        charlie27 = caller.GetComponent<Character>();

        GameObject target = parms[2] as GameObject;
        enemy = target.GetComponent<Character>();

        charlie27.castSkill("SkillA");
        charlie27.toward(enemy.transform.position);

        LoadResources();

        if (charlie27 is Charlie27)
            AddFrameEvent(charlie27 as Charlie27);
        else
            AddFrameEvent(charlie27 as Ch3_Charlie27);

        yield return new WaitForSeconds(0f);
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:21,代码来源:Skill_CHARLIE271.cs

示例4: Cast

    public override IEnumerator Cast(ArrayList objs)
    {
        parms = objs;
        GameObject caller = parms[1] as GameObject;
        GameObject target = parms[2] as GameObject;
        skunge = caller.GetComponent<Character>();
        enemy  = target.GetComponent<Character>();
        skunge.toward(target.transform.position);
        skunge.castSkill("SkillA");
        yield return new WaitForSeconds(0.98f);

        showEft();

        yield return new WaitForSeconds(0.2f);
        //				Time.timeScale = 0.01f;
        //		int i = 0;
        //		while(1>0){
        //			yield return new WaitForSeconds(0.01f);
        //			Debug.LogError(i++);
        //		}
        DamageEnemy();
    }
开发者ID:rogeryuan99,项目名称:Hello,代码行数:22,代码来源:Skill_SKUNGE1.cs


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