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


C# ActorController.GetAtt方法代码示例

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


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

示例1: CanHit

 private bool CanHit(ActorController target)
 {
     if (target == null)
     {
         return false;
     }
     if (this.IsFriendlyTo(target))
     {
         return true;
     }
     int num = 90 + this.GetAtt(EAttID.EAID_Hit) / 100 + (int)((this.Level - target.Level) * 20u / target.Level) - target.GetAtt(EAttID.EAID_Dodge) / 100;
     return num > 0 && UtilFunc.RangeRandom(0, 100) <= num;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:13,代码来源:ActorController.cs

示例2: CalculateDamage

 public int CalculateDamage(int value1, int value2, ActorController target)
 {
     int attackType = this.GetAttackType();
     long num = 0L;
     if (this.ignoreDefense != null && Time.time >= this.ignoreDefense.Cooldown && UtilFunc.RangeRandom(0, 10000) < this.ignoreDefense.Value1)
     {
         this.ignoreDefense.Cooldown = Time.time + (float)this.ignoreDefense.Value3;
         num = (long)this.GetAtt(EAttID.EAID_Attack);
     }
     else if (attackType == 1)
     {
         num = (long)(this.GetAtt(EAttID.EAID_Attack) - target.GetAtt(EAttID.EAID_PhysicDefense));
     }
     else if (attackType == 3)
     {
         num = (long)(this.GetAtt(EAttID.EAID_Attack) - target.GetAtt(EAttID.EAID_MagicDefense));
     }
     else
     {
         num += (long)(this.GetAtt(EAttID.EAID_Attack) - target.GetAtt(EAttID.EAID_MagicDefense));
         num += (long)(this.GetAtt(EAttID.EAID_Attack) - target.GetAtt(EAttID.EAID_PhysicDefense));
         num /= 2L;
     }
     int num2 = this.GetAtt(EAttID.EAID_DamagePlus) - target.GetAtt(EAttID.EAID_DamageMinus);
     if (num2 < -8000)
     {
         num2 = -8000;
     }
     num = num * (long)(10000 + num2) / 10000L;
     num = num * (long)value1 / 10000L;
     num += (long)value2;
     if (num < 1L)
     {
         num = 1L;
     }
     return (int)num;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:37,代码来源:ActorController.cs

示例3: CanCrit

 public bool CanCrit(ActorController target)
 {
     if (target == null)
     {
         return false;
     }
     int num = this.GetAtt(EAttID.EAID_Crit) / 100 + (int)((this.Level - target.Level) * 10u / this.Level) - target.GetAtt(EAttID.EAID_CritResis) / 100;
     return num > 0 && UtilFunc.RangeRandom(0, 100) <= num;
 }
开发者ID:floatyears,项目名称:Decrypt,代码行数:9,代码来源:ActorController.cs


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