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


C# AttackType类代码示例

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


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


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