本文整理汇总了C#中BuffType类的典型用法代码示例。如果您正苦于以下问题:C# BuffType类的具体用法?C# BuffType怎么用?C# BuffType使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
BuffType类属于命名空间,在下文中一共展示了BuffType类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的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;
}
示例2: GetBuffs
public IList GetBuffs(BuffType buff)
{
IList addBuffs = new List<BuffType>();
foreach(BuffType bf in addBuff){
addBuffs.Add(bf);
}
return addBuffs;
}
示例3: EnemyBuff
public EnemyBuff(BuffType type, float value, float duration, float lifetime)
{
Type = type;
Value = value;
Duration = duration;
Lifetime = lifetime;
}
示例4: ReadPacket
protected override void ReadPacket(BinaryReader reader)
{
Type = (BuffType)reader.ReadByte();
Caster = reader.ReadString();
Expire = reader.ReadInt64();
Value = reader.ReadInt32();
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例9: GetDeBuffs
public IList GetDeBuffs(BuffType buff)
{
IList deBuffs = new List<BuffType>();
foreach(BuffType bf in deBuff){
deBuffs.Add(bf);
}
return deBuffs;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}
示例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;
}