• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# AttackType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中AttackType的典型用法代码示例。如果您正苦于以下问题:C# AttackType类的具体用法?C# AttackType怎么用?C# AttackType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



AttackType类属于命名空间,在下文中一共展示了AttackType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Blob

 protected Blob(string name, int health, int damage, AttackType attackType)
 {
     this.Name = name;
     this.Health = health;
     this.Damage = damage;
     this.AttackType = attackType;
 }
开发者ID:IskraNikolova,项目名称:Object-oriented-programming,代码行数:7,代码来源:Blob.cs


示例2: UnitType

        public readonly int[][] walkIndices; // [RDLU][index]

        #endregion Fields

        #region Constructors

        public UnitType(string name="", double maxHealth=100.0, AttackType attackType=AttackType.Melee,
            double attackStrength=1.0, double attackRange=1.0, double attackSpeed = 1.0, double defense=0.0,
            MovementType movementType=MovementType.Walker,
            double movementSpeed=1.0, List<Action> actions=null, List<Spell> spells=null, double gatherRate = 10.0,
            double goldCost=10.0, double ironCost=0.0, double manaCrystalsCost=0.0,
            Texture2D[] idleTextures=null, Texture2D[] attackTextures=null, Texture2D[] moveTextures=null)
        {
            this.name = name;
            this.maxHealth = maxHealth;
            this.attackType = attackType;
            this.attackStrength = attackStrength;
            this.attackRange = attackRange;
            this.attackSpeed = attackSpeed;
            this.defense = defense;
            this.movementType = movementType;
            this.movementSpeed = movementSpeed;
            this.actions = actions ?? new List<Action>();
            this.spells = spells ?? new List<Spell>();
            this.gatherRate = gatherRate;
            this.goldCost = goldCost;
            this.ironCost = ironCost;
            this.manaCrystalsCost = manaCrystalsCost;
            this.idleTextures = idleTextures ?? new Texture2D[] { };
            this.attackTextures = attackTextures ?? new Texture2D[] { };
            this.moveTextures = moveTextures ?? new Texture2D[] { };
        }
开发者ID:XNAWizards,项目名称:mst-boredom-remover,代码行数:32,代码来源:UnitType.cs


示例3: DHCPACKInjectionAttack

 public DHCPACKInjectionAttack(AttackType attackType, string gateway, string dns, string MAC)
     : base(attackType)
 {
     this.gateway = gateway;
     this.dns = dns;
     this.MAC = MAC;
 }
开发者ID:ignaciots,项目名称:EvilFOCA,代码行数:7,代码来源:DHCPACKInjectionAttack.cs


示例4: determineTargets

 public static Targets determineTargets(float size,DietType Diet, AttackType Attack)
 {
     if(Attack == AttackType.Scavenging){
         return Targets.Dead;
     }
     else if(size >= 35){
         return Targets.Smaller;
     }
     else if(size <= 5){
         return Targets.Larger;
     }
     else if(Attack == AttackType.Rushing){
         return Targets.Larger;
     }
     else if(Random.value<0.2){
         return Targets.Both;
     }
     else{
         float sizeWeight = (20-size)/100;
         float largeChance = 0.5f+sizeWeight;
         if(largeChance < Random.value){
             return Targets.Larger;
         }
         else{
             return Targets.Smaller;
         }
     }
 }
开发者ID:Krosantos,项目名称:Ocean,代码行数:28,代码来源:GenUtil.cs


示例5: checkStateEndOfAction

    public void checkStateEndOfAction()
    {
        Combat.reset();
        currentAttack = AttackType.Basic;
        getSelectedManager().disableSelect();
        attackProj.enabled = false;
        changeUnit.enabled = false;

        if (GameObject.FindGameObjectsWithTag("Player0Squad").Length == 0)
        {
            nLogicView.RPC("gameOver", RPCMode.All, 2);
            return;
        }

        if (GameObject.FindGameObjectsWithTag("Player1Squad").Length == 0)
        {
            nLogicView.RPC("gameOver", RPCMode.All, 1);
            return;
        }

        if (getSelectedManager ().numActions == SquadManager.MAX_ACTIONS) {
            currentStage = TurnStage.None;
        }
        else if(getSelectedManager ().numActions == 0) {
            getSelectedManager().nView.RPC("activeSquadColor", RPCMode.All, false);
            nextTurn();
        }
        else
            currentStage = TurnStage.InBetween;

        updateUI();
    }
开发者ID:JSybrandt,项目名称:ProjektBerlin,代码行数:32,代码来源:Controller.cs


示例6:

 public IList<MagicData> this[AttackType element, byte level]
 {
     get
     {
         return table[ElementToInt(element), level];
     }
 }
开发者ID:ProjectTane,项目名称:FarenDotNet,代码行数:7,代码来源:MagicDictionary.cs


示例7: InvalidMacSpoofAttackIpv4Attack

 public InvalidMacSpoofAttackIpv4Attack(Target t1, Target t2, AttackType attackType)
     : base(attackType)
 {
     invalidMac = PhysicalAddress.Parse("FA-BA-DA-FA-BA-DA".ToUpper());
     this.t1 = t1;
     this.t2 = t2;
 }
开发者ID:ignaciots,项目名称:EvilFOCA,代码行数:7,代码来源:InvalidMacSpoofAttackIpv4Attack.cs


示例8: Restart

 public void Restart()
 {
     this.atkType = AttackType.Idle;
     this.life = 500;
     this.cd = 0;
     this.fight = false;
 }
开发者ID:JMounier,项目名称:Aegina,代码行数:7,代码来源:SyncBoss.cs


示例9: Attack

 public Attack(string _key, AttackType _attackType, int _damage, int? _cooldown, int? _col_rect_x, int? _col_rect_y)
     : base(_key, _col_rect_x.GetValueOrDefault(), _col_rect_y.GetValueOrDefault())
 {
     attackType = _attackType;
     damage = _damage;
     cooldown = _cooldown.GetValueOrDefault();
 }
开发者ID:willym1,项目名称:PantsGame,代码行数:7,代码来源:Attack.cs


示例10: TestPower

        public virtual void TestPower(Type type, ActionType actionType, AttackType attackType, string range, DamageTypes damageTypes, string effect,
            EffectTypes effectTypes, PowerFrequency frequency, PowerSource powerSource, string trigger)
        {
            Power power;

            power = Character.GetPowers().Where(x => (x.GetType() == type)).First();
            Assert.NotNull(power, "Power not found");

            Assert.AreEqual(actionType, power.Action);
            Assert.AreEqual(attackType, power.AttackTypeAndRange.AttackType);
            Assert.AreEqual(range, power.AttackTypeAndRange.Range);
            Assert.AreEqual(damageTypes, power.DamageTypes);
            Assert.AreEqual(effect != null, power.HasEffect);
            if (effect != null)
            {
                Assert.AreEqual(effect, power.Effect);
            }
            Assert.AreEqual(effectTypes, power.EffectTypes);
            Assert.AreEqual(frequency, power.Frequency);
            Assert.AreEqual(powerSource, power.PowerSource);
            Assert.AreEqual(trigger != null, power.HasTrigger);
            if (trigger != null)
            {
                Assert.AreEqual(trigger, power.Trigger);
            }
        }
开发者ID:anthonylangsworth,项目名称:GammaWorldCharacter,代码行数:26,代码来源:CharacterTest.cs


示例11: Attack

 public void Attack(AttackType attackType)
 {
     combosManager.AddAttackToCurrentSequence(attackType);
     if (nextAttackAlreadyTriggered() || !combosManager.IsComboAvailableForCurrentSequence())
         combosManager.CancelCombo();
     else
         triggerAttack(combosManager.GetAnimationForCurrentCombo());
 }
开发者ID:Raysangar,项目名称:MasksPrototype,代码行数:8,代码来源:AttackController.cs


示例12: Attack

 //TODO: Effects List. e.g. Slow, Freeze, Stun, etc.
 public Attack(int damageAmount, float knockbackAmount, AttackType attackType, GameObject attacker, GameObject target)
 {
     damage = damageAmount;
     knockback = knockbackAmount;
     type = attackType;
     attackOrigin = attacker;
     attackTarget = target;
 }
开发者ID:mateoKlab,项目名称:AMD,代码行数:9,代码来源:Attack.cs


示例13: MagicAction

 public MagicAction(IScope scope, ICost cost, int power, AttackType attackType, IScreenEffect screenEffect)
 {
     _scope = scope;
     _cost = cost;
     _power = power;
     _attackType = attackType;
     _screenEffect = screenEffect;
 }
开发者ID:ProjectTane,项目名称:FarenDotNet,代码行数:8,代码来源:MagicAction.cs


示例14: Attack

 /// <summary>
 /// Initializes a member of the attack class.
 /// </summary>
 /// <param name="Amount">the number of times this attack can be used, set it to -1 for unlimited uses</param>
 /// <param name="SplashDamage">A list of a list of coordinates that are checked for ships, they are offsets for the center which is implied to have a coordinate of {0,0} and each coordinate is added to the coordinates that the player is aiming at</param>
 /// <param name="CenterIncluded">A list that determines if the center coordinate {0,0} is included in the attack</param>
 /// <param name="MyAttack">/This is the thing that will happen if one of the opponent's items is found by this attack</param>
 /// <param name="AttackName">The string representation of the attack</param>
 public Attack(int Amount, int[][][] SplashDamage, bool[] CenterIncluded, AttackType MyAttack, string AttackName)
 {
     this.Amount = Amount;
     this.SplashDamage = SplashDamage;
     this.CenterIncluded = CenterIncluded;
     this.MyAttack = MyAttack;
     this.AttackName = AttackName;
 }
开发者ID:WGDEVS,项目名称:SeaBattle,代码行数:16,代码来源:Attack.cs


示例15: Attacks

	public Attacks (string name, int id, int fireAmount, float speed, int manaCost, AttackType type){
		attName = name;
		attID = id;
		amountFired = fireAmount;
		attSpeed = speed;
		manaUse = manaCost;
		attType = type;
	}
开发者ID:LawsonLamb,项目名称:HeartAttack1.1a,代码行数:8,代码来源:Attacks.cs


示例16: WallCrashAction

 public WallCrashAction(IScope scope, ICost cost, IScreenEffect screenEffect, int power, AttackType attackType)
 {
     _scope = scope;
     _cost = cost;
     _screenEffect = screenEffect;
     _power = power;
     _attackType = attackType;
 }
开发者ID:ProjectTane,项目名称:FarenDotNet,代码行数:8,代码来源:WallCrashAction.cs


示例17: DefaultAttack

 public DefaultAttack(int power, AttackType attr)
 {
     Debug.Assert(0 <= power && power <= 9999,
         "攻撃力(" + power + ")は0から9999の間で指定してください。");
     Debug.Assert(AttackType.なし <= attr && attr <= AttackType.神聖,
         "攻撃(" + attr + ")は物理~神聖の間で指定してください。");
     this.Power = power;
     this.Type = attr;
 }
开发者ID:ProjectTane,项目名称:FarenDotNet,代码行数:9,代码来源:DefaultAttack.cs


示例18: GetSpecialHitPerc

        public static double GetSpecialHitPerc(AttackType Data, string specialName)
        {
            if (Data.Hits < 1)
                return 0;

            double specials = GetSpecialHitCount(Data, specialName);
            specials /= Data.Hits;
            return specials * 100.0;
        }
开发者ID:quasimojo,项目名称:CO-ACTLib,代码行数:9,代码来源:Helper.cs


示例19: DelugeAction

 public DelugeAction(IScope scope, ICost cost, IScreenEffect screenEffect, int power, AttackType attackType, Landform waterLandform)
 {
     _scope = scope;
     _cost = cost;
     _screenEffect = screenEffect;
     _brinkLandform = waterLandform;
     _power = power;
     _attackType = attackType;
 }
开发者ID:ProjectTane,项目名称:FarenDotNet,代码行数:9,代码来源:DelugeAction.cs


示例20: return

 public ResistivityType this[AttackType attr]
 {
     get {
         return (ResistivityType)_resist[(int)attr - (int)AttackType.物理];
     }
     set
     {
         _resist[(int)attr - (int)AttackType.物理] = (byte)value;
     }
 }
开发者ID:ProjectTane,项目名称:FarenDotNet,代码行数:10,代码来源:Resistivity.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# AttackableUnit类代码示例发布时间:2022-05-24
下一篇:
C# AttackResult类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap