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


C# BuffType类代码示例

本文整理汇总了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;
 }
开发者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


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