本文整理汇总了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;
}
示例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[] { };
}
示例3: DHCPACKInjectionAttack
public DHCPACKInjectionAttack(AttackType attackType, string gateway, string dns, string MAC)
: base(attackType)
{
this.gateway = gateway;
this.dns = dns;
this.MAC = MAC;
}
示例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;
}
}
}
示例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();
}
示例6:
public IList<MagicData> this[AttackType element, byte level]
{
get
{
return table[ElementToInt(element), level];
}
}
示例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;
}
示例8: Restart
public void Restart()
{
this.atkType = AttackType.Idle;
this.life = 500;
this.cd = 0;
this.fight = false;
}
示例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();
}
示例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);
}
}
示例11: Attack
public void Attack(AttackType attackType)
{
combosManager.AddAttackToCurrentSequence(attackType);
if (nextAttackAlreadyTriggered() || !combosManager.IsComboAvailableForCurrentSequence())
combosManager.CancelCombo();
else
triggerAttack(combosManager.GetAnimationForCurrentCombo());
}
示例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;
}
示例13: MagicAction
public MagicAction(IScope scope, ICost cost, int power, AttackType attackType, IScreenEffect screenEffect)
{
_scope = scope;
_cost = cost;
_power = power;
_attackType = attackType;
_screenEffect = screenEffect;
}
示例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;
}
示例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;
}