本文整理汇总了C#中BuffType类的典型用法代码示例。如果您正苦于以下问题:C# BuffType类的具体用法?C# BuffType怎么用?C# BuffType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BuffType类属于命名空间,在下文中一共展示了BuffType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: GetContent
string GetContent(BuffType type)
{
string content = "";
switch(type){
case BuffType.Attack:
content = "atk";
break;
case BuffType.AttackRange:
content = "range";
break;
case BuffType.CriticalHit:
content = "critic";
break;
case BuffType.Defense:
content = "hp";
break;
case BuffType.MoveRange:
content = "move";
break;
case BuffType.SkillRate:
content = "skill";
break;
}
return content;
}
开发者ID:hugobozzshih007,项目名称:BattleCard,代码行数:25,代码来源:BuffSlidingUI.cs
示例2: GetBuffs
public IList GetBuffs(BuffType buff)
{
IList addBuffs = new List<BuffType>();
foreach(BuffType bf in addBuff){
addBuffs.Add(bf);
}
return addBuffs;
}
开发者ID:hugobozzshih007,项目名称:BattleCard,代码行数:8,代码来源:BuffList.cs
示例3: EnemyBuff
public EnemyBuff(BuffType type, float value, float duration, float lifetime)
{
Type = type;
Value = value;
Duration = duration;
Lifetime = lifetime;
}
开发者ID:jcollins2014,项目名称:Project,代码行数:7,代码来源:EnemyBuffs.cs
示例4: ReadPacket
protected override void ReadPacket(BinaryReader reader)
{
Type = (BuffType)reader.ReadByte();
Caster = reader.ReadString();
Expire = reader.ReadInt64();
Value = reader.ReadInt32();
}
开发者ID:xiaofengzhiyu,项目名称:CSharpMir,代码行数:7,代码来源:ServerPackets.cs
示例5: AddBuff
public void AddBuff(BuffType buff)
{
if (curBuff == buff)
{
buffEndTime += buffDuration;
Debug.Log("Buff duration add:" + buffDuration);
return;
}
else
RemoveBuff();
switch (buff)
{
case BuffType.SPEED:
speed = speed * 1.5f;
GetComponent<SpriteRenderer>().material = matSpeed;
break;
case BuffType.HIGH:
jumpSpeed = jumpSpeed * 1.3f;
jumpSpeed2 = jumpSpeed2 * 1.3f;
break;
case BuffType.GOD:
Physics2D.IgnoreLayerCollision(10, 9, true);
if (godGlow)
godGlow.SetActive(true);
break;
}
Debug.Log("AddBuff:" + buff);
curBuff = buff;
buffEndTime = Time.time + buffDuration;
}
开发者ID:dvsonic,项目名称:MonkeyJump,代码行数:30,代码来源:MonkeyController.cs
示例6: DamageDesc
public DamageDesc(int damage, Type type, BuffType buffType, GameObject prefEffect)
{
m_damage = damage;
m_type = type;
m_buffType = buffType;
m_prefEffect = prefEffect;
m_pushbackOnDamage = true;
}
开发者ID:yakolla,项目名称:MarineVsAlien,代码行数:8,代码来源:DamageDesc.cs
示例7: BuffEffect
public BuffEffect(MLibrary library, int baseIndex, int count, int duration, MapObject owner, bool blend, BuffType buffType)
: base(library, baseIndex, count, duration, owner, 0)
{
Repeat = true;
Blend = blend;
BuffType = buffType;
Light = -1;
}
开发者ID:rise-worlds,项目名称:mir2,代码行数:8,代码来源:Effect.cs
示例8: BuffVisualUI
void BuffVisualUI(BuffType type, int val, BuffSlidingUI bSUI)
{
Dictionary<BuffType,int> dict = new Dictionary<BuffType, int>();
dict.Add(type, val);
BuffUI bUI = new BuffUI(aider,dict);
bSUI.UIItems.Add(bUI);
bSUI.FadeInUI = true;
}
开发者ID:hugobozzshih007,项目名称:BattleCard,代码行数:8,代码来源:GainSelfPower.cs
示例9: GetDeBuffs
public IList GetDeBuffs(BuffType buff)
{
IList deBuffs = new List<BuffType>();
foreach(BuffType bf in deBuff){
deBuffs.Add(bf);
}
return deBuffs;
}
开发者ID:hugobozzshih007,项目名称:BattleCard,代码行数:8,代码来源:BuffList.cs
示例10: Buff
internal Buff(double gameTime, BuffType buffType, double totalLength, double value)
{
if (buffType == BuffType.physicalDOT)
throw new Exception("use correct instanstor");
startTime = gameTime/1000;
this.totalLength = totalLength;
this.value = value;
bType = buffType;
}
开发者ID:nik0kin,项目名称:ProjectTurtle,代码行数:9,代码来源:Buff.cs
示例11: ValueOf
public double ValueOf(BuffType type)
{
double returnValue = 0;
foreach (Tuple<BuffType, double> t in Buffs) {
if (t.Item1 == type)
returnValue += t.Item2;
}
return returnValue;
}
开发者ID:adamrezich,项目名称:arena,代码行数:9,代码来源:Buff.cs
示例12: GetIcon
public Texture2D GetIcon(BuffType mode, Transform chess)
{
Texture2D icon = null;
CharacterProperty cp = chess.GetComponent<CharacterProperty>();
switch(mode){
case BuffType.MoveRange:
if(cp.BuffMoveRange == cp.moveRange)
icon = Move[0];
else if(cp.BuffMoveRange > cp.moveRange)
icon = Move[1];
else
icon = Move[2];
break;
case BuffType.AttackRange:
if(cp.BuffAtkRange == cp.atkRange)
icon = Range[0];
else if(cp.BuffAtkRange > cp.atkRange)
icon = Range[1];
else
icon = Range[2];
break;
case BuffType.Attack:
if(cp.Damage == cp.atkPower)
icon = Damage[0];
else if(cp.Damage > cp.atkPower)
icon = Damage[1];
else
icon = Damage[2];
break;
case BuffType.Defense:
if(cp.Hp == cp.defPower)
icon = Hp[0];
else if(cp.Hp > cp.defPower)
icon = Hp[1];
else
icon = Hp[2];
break;
case BuffType.CriticalHit:
if(cp.BuffCriticalHit == cp.CriticalhitChance)
icon = Critiq[0];
else if(cp.BuffCriticalHit > cp.CriticalhitChance)
icon = Critiq[1];
else
icon = Critiq[2];
break;
case BuffType.SkillRate:
if(cp.BuffSkillRate == cp.SkillRate)
icon = Skill[0];
else if(cp.BuffSkillRate > cp.SkillRate)
icon = Skill[1];
else
icon = Skill[2];
break;
}
return icon;
}
开发者ID:hugobozzshih007,项目名称:BattleCard,代码行数:56,代码来源:InfoUI.cs
示例13: Buff
public Buff(string buffName, float dur, BuffType type, Unit u) //no attacker specified = selfbuff, attacker aka source is same as attachedto
{
this.duration = dur;
this.name = buffName;
this.timeElapsed = 0;
this.remove = false;
this.attachedTo = u;
this.attacker = u;
this.buffType = type;
this.movementSpeedPercentModifier = 0.0f;
}
开发者ID:horato,项目名称:IntWarsSharp,代码行数:11,代码来源:Buff.cs
示例14: BuffData
public BuffData(string id, string toId, BuffType type, int second, int getHP = 0, int getMP = 0, string effectResName = "sword arua 13", string haloResName = "ring 12")
{
_id = id;
_toId = toId;
Type = type;
Second = second;
GetHP = getHP;
GetMP = getMP;
EffectResName = effectResName;
HaloResName = haloResName;
}
开发者ID:zhaoguo20002,项目名称:WuGong,代码行数:11,代码来源:BuffData.cs
示例15: Buff
public Buff(string name, BuffAlignment type, BuffType buffType, double value, TimeSpan? expirationTime, bool hidden)
{
Name = name;
Type = type;
Buffs = new List<Tuple<BuffType, double>>() { new Tuple<BuffType, double>(buffType, value) };
if (expirationTime.HasValue)
ExpirationTime = (TimeSpan)expirationTime;
else
Permanent = true;
Hidden = hidden;
}
开发者ID:adamrezich,项目名称:arena,代码行数:11,代码来源:Buff.cs
示例16: CastSpell
private static void CastSpell(Spell spell, BuffType x, Obj_AI_Hero target, float lastpostime)
{
if (x == BuffType.Stun || x == BuffType.Snare || x == BuffType.Knockup || x == BuffType.Fear)
{
if (Game.Time <= lastpostime)
{
spell.Cast(target.ServerPosition);
}
}
else
{
var pred = spell.GetPrediction(target);
if (pred != null && Game.Time <= lastpostime)
{
spell.Cast(pred.CastPosition);
}
}
}
开发者ID:ninja1234567,项目名称:LeagueSharp,代码行数:19,代码来源:Program.cs
示例17: Buff
public Buff(BinaryReader reader)
{
Type = (BuffType)reader.ReadByte();
Caster = null;
Visible = reader.ReadBoolean();
ObjectID = reader.ReadUInt32();
ExpireTime = reader.ReadInt64();
if (Envir.LoadVersion < 56)
{
Values = new int[] { reader.ReadInt32() };
}
else
{
Values = new int[reader.ReadInt32()];
for (int i = 0; i < Values.Length; i++)
{
Values[i] = reader.ReadInt32();
}
}
Infinite = reader.ReadBoolean();
}
开发者ID:GenysisGaming,项目名称:mir2,代码行数:24,代码来源:MapObject.cs
示例18: BuffImage
public int BuffImage(BuffType type)
{
switch (type)
{
//Skills
case BuffType.Teleport:
return 25;
case BuffType.Hiding:
return 24;
case BuffType.Haste:
return 0;
case BuffType.SwiftFeet:
return 21;
case BuffType.Fury:
return 8;
case BuffType.LightBody:
return 22;
case BuffType.SoulShield:
return 11;
case BuffType.BlessedArmour:
return 10;
case BuffType.ProtectionField:
return 9;
case BuffType.Rage:
return 81;
case BuffType.CounterAttack:
return 46;
case BuffType.UltimateEnhancer:
return 99;
case BuffType.EnergyShield:
return 4;
case BuffType.Curse:
return 32;
case BuffType.MoonLight:
return 24;
case BuffType.DarkBody:
return 24;
case BuffType.Concentration:
return 66;
case BuffType.VampireShot:
return 74;
case BuffType.PoisonShot:
return 68;
case BuffType.MentalState:
return 59;
case BuffType.MagicBooster:
return 37;
//Random
case BuffType.GameMaster:
return 51;
case BuffType.General:
return 503;
case BuffType.Exp:
return 334;
case BuffType.Drop:
return 12;
case BuffType.Gold:
return 316;
case BuffType.BagWeight:
return 12;
case BuffType.Transform:
return 19;
case BuffType.Mentor:
return 30;
case BuffType.Mentee:
return 30;
case BuffType.RelationshipEXP:
return 61;
case BuffType.GuildBuff:
return 63;
//Consumables
case BuffType.Impact:
return 321;
case BuffType.Magic:
return 305;
case BuffType.Taoist:
return 327;
case BuffType.Storm:
return 317;
case BuffType.HealthAid:
return 13;
case BuffType.ManaAid:
return 15;
case BuffType.WonderShield:
return 4;
case BuffType.MagicWonderShield:
return 4;
default:
return 0;
}
}
开发者ID:ElijahLOMCN,项目名称:mir2,代码行数:93,代码来源:GameScene.cs
示例19: BuffImage
public int BuffImage(BuffType type)
{
switch (type)
{
case BuffType.Teleport:
return 885;
case BuffType.Hiding:
return 884;
case BuffType.Haste:
return 880;
case BuffType.SwiftFeet:
return 881;
case BuffType.Fury:
return 868;
case BuffType.LightBody:
return 882;
case BuffType.SoulShield:
return 870;
case BuffType.BlessedArmour:
return 871;
case BuffType.ProtectionField:
return 861;
case BuffType.Rage:
return 905;
case BuffType.CounterAttack:
return 144 + 20000;
case BuffType.UltimateEnhancer:
return 862;
case BuffType.Curse:
return 892;
case BuffType.MoonLight:
return 884;
case BuffType.DarkBody:
return 884;
case BuffType.General:
return 903;
case BuffType.Exp:
return 903;
case BuffType.Drop:
return 872;
case BuffType.Gold:
return 907;
case BuffType.Impact:
return 893;
case BuffType.Magic:
return 901;
case BuffType.Taoist:
return 889;
case BuffType.Storm:
return 908;
case BuffType.HealthAid:
return 873;
case BuffType.ManaAid:
return 904;
case BuffType.Concentration://ArcherSpells - Elemental system
return 11162; //Prguse2
case BuffType.VampireShot://ArcherSpells - VampireShot
return 200 + 20000; //MagIcon
case BuffType.PoisonShot://ArcherSpells - PoisonShot
return 204 + 20000; //MagIcon
case BuffType.MentalState:
return 905;//todo replace with it's own custom buff icon (maybe make it change depending on state)
default:
return 0;
}
}
开发者ID:ufaith,项目名称:cmir2,代码行数:66,代码来源:GameScene.cs
示例20: AddToMenu
public static void AddToMenu(Menu menu, BuffType buffType, HeroListManagerArgs args, bool randomize)
{
AddToMenu(menu, new List<BuffType> { buffType }, args, randomize);
}
开发者ID:Lizzaran,项目名称:LeagueSharp-Standalones,代码行数:4,代码来源:BuffManager.cs
注:本文中的BuffType类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论