• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    迪恩网络公众号

C# StatType类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

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



StatType类属于命名空间,在下文中一共展示了StatType类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。

示例1: Mod

 public Mod(StatType stat, ModifierType type, double value)
     : this()
 {
     Stat = stat;
     Type = type;
     Value = value;
 }
开发者ID:InferiorOlive,项目名称:AIQuest,代码行数:7,代码来源:StatModifierComponent.cs


示例2: Create

 public static Stat Create(StatType type)
 {
     GameObject obj = (GameObject) Instantiate(Resources.Load("GUI/StatsPanel/Stat"));
     Stat stat = obj.GetComponent<Stat>();
     stat.Init(type);
     return stat;
 }
开发者ID:ullizei,项目名称:pirates,代码行数:7,代码来源:Stat.cs


示例3: Modifier

 public Modifier(StatType stat, bool percent, float percentValue, short value)
 {
     Percent = percent;
     PercentValue = percentValue;
     Stat = stat;
     Value = value;
 }
开发者ID:nate0001,项目名称:AIR,代码行数:7,代码来源:Modifier.cs


示例4: Stat

 public Stat(StatType type, double startingValue = 0.0, double mod = 0.0, double dep = 0.0)
 {
     this.Type = type;
     modifier = mod;
     depletion = dep;
     basevalue = startingValue;
 }
开发者ID:insylogo,项目名称:SpriteStrife,代码行数:7,代码来源:Stat.cs


示例5: Item

        public Item(GraphicsDeviceManager g, ContentManager c, int weapon, Vector2 startLoc, Vector2 playerDim)
        {
            graphics = g;
            content = c;

            dimensions = new Vector2(90, 120);
            loc = new Vector2(startLoc.X - playerDim.X / 2, startLoc.Y - playerDim.Y / 3);

            random = new Random();

            if (weapon == 0)
            {
                LoadContent("Textures/ShortSwordWalk");

                vitality = 0;
                dexterity = 0;
                intelligence = 0;
                strength = 0;

                critBonus = 0;
                critChance = 0;

                minDmg = 1f;
                maxDmg = 5f;

                statType = StatType.str;
                weaponType = WeaponType.slash;

                atkSpd = 1f;
            }

            animation = new SpriteAnimation(8, itemSpriteSheet, .45, new Rectangle((int)loc.X, (int)loc.Y,
                                                                      (int)dimensions.X, (int)dimensions.Y));
        }
开发者ID:Blargansmarf,项目名称:RPGrunner,代码行数:34,代码来源:Item.cs


示例6:

 public Stat this[StatType type]
 {
     get
     {
         return stats[type];
     }
 }
开发者ID:Rupini,项目名称:Hexocracy,代码行数:7,代码来源:StatsHolder.cs


示例7: GetLevelByType

    public int GetLevelByType( StatType type )
    {
        int returnInt = 0;
        switch ( type )
        {
            case ( StatType.ShotPower ):
                returnInt = shotPowerLevel;
            break;

            case ( StatType.ShieldLevel ):
                returnInt = shieldLevel;
            break;

            case ( StatType.SpeedThrust ):
                returnInt = speedThrustLevel;
            break;

            case ( StatType.ThrustDuration ):
                returnInt = thrustDurationLevel;
            break;

            case ( StatType.LightRadius ):
                returnInt = lightRadiusLevel;
            break;
        }

        return returnInt + 1;
    }
开发者ID:AndreiMarks,项目名称:porchlight,代码行数:28,代码来源:PlayerStats.cs


示例8: GetMeleeAPModByStat

		public int GetMeleeAPModByStat(StatType stat)
		{
			if (m_MeleeAPModByStat == null)
			{
				return 0;
			}
			return m_MeleeAPModByStat[(int)stat];
		}
开发者ID:NVN,项目名称:WCell,代码行数:8,代码来源:Character.Mechanics.cs


示例9: GetRangedAPModByStat

		public int GetRangedAPModByStat(StatType stat)
		{
			if (m_RangedAPModByStat == null)
			{
				return 0;
			}
			return m_RangedAPModByStat[(int)stat];
		}
开发者ID:NVN,项目名称:WCell,代码行数:8,代码来源:Character.Mechanics.cs


示例10: SetMeleeAPModByStat

		public void SetMeleeAPModByStat(StatType stat, int value)
		{
			if (m_MeleeAPModByStat == null)
			{
				m_MeleeAPModByStat = new int[(int)StatType.End];
			}
			m_baseStats[(int)stat] = value;
			this.UpdateMeleeAttackPower();
		}
开发者ID:NVN,项目名称:WCell,代码行数:9,代码来源:Character.Mechanics.cs


示例11: GetDateStatistics

        public int[] GetDateStatistics(StatType statType, string subject)
        {
            List<StatType> stats = new List<StatType>();
            stats.Add(statType);

            Dictionary<StatType, int[]> retVal = GetDateStatistics(stats, subject);

            return retVal[statType];
        }
开发者ID:ttu,项目名称:Email-Statistics,代码行数:9,代码来源:InterIMAPGmailHelper.cs


示例12: BlessEffect

 public BlessEffect( StatType stat, int sound, int eid, int speed, int duraction, int eff, EffectLayer layer )
 {
     m_Stat = stat;
     m_Snd = sound;
     m_EffIID = eid;
     m_EffSpd = speed;
     m_Dur = duraction;
     m_Eff = eff;
     m_ELayer = layer;
 }
开发者ID:FreeReign,项目名称:Rebirth-Repack,代码行数:10,代码来源:SpellEffect.cs


示例13: PercentageStat

 public PercentageStat(
     string shortName,
     string name,
     string description,
     string category,
     string container,
     StatType type,
     Action<Stat> pullAction,
     StatVerbosity verbosity)
     : base(shortName, name, description, "%", category, container, type, pullAction, verbosity) {}
开发者ID:BogusCurry,项目名称:arribasim-dev,代码行数:10,代码来源:PercentageStat.cs


示例14: StatRecord

 // more fields can be added (see in visualGGPK)
 public StatRecord(Memory m, int addr)
 {
     Key = m.ReadStringU(m.ReadInt(addr + 0), 255);
     Unknown4 = m.ReadByte(addr + 4) != 0;
     Unknown5 = m.ReadByte(addr + 5) != 0;
     Unknown6 = m.ReadByte(addr + 6) != 0;
     Type = (StatType) m.ReadInt(addr + 7);
     UnknownB = m.ReadByte(addr + 0xB) != 0;
     UserFriendlyName = m.ReadStringU(m.ReadInt(addr + 0xC), 255);
 }
开发者ID:asd34278,项目名称:PoeHud,代码行数:11,代码来源:StatsDat.cs


示例15: updateStats

        public void updateStats(StatType statType, int count)
        {
            int tmpCount = 0;

            switch (statType)
            {
                case StatType.Input:
                    if (this.InvokeRequired)
                    {
                        this.submittedJobsLabel.Invoke(new Action<StatType, int>(updateStats), new object[] { statType, count });
                    }
                    lock (stateLock)
                    {
                        tmpCount = count;
                    }
                    this.submittedJobsLabel.Text = tmpCount.ToString();
                    break;

                case StatType.Inprocess:
                    if (this.InvokeRequired)
                    {
                        this.inProcessJobsLabel.Invoke(new Action<StatType, int>(updateStats), new object[] { statType, count });
                    }
                    lock (stateLock)
                    {
                        tmpCount = count;
                    }
                    this.inProcessJobsLabel.Text = tmpCount.ToString();
                    break;

                case StatType.Success:
                    if (this.InvokeRequired)
                    {
                        this.successJobsLabel.Invoke(new Action<StatType, int>(updateStats), new object[] { statType, count });
                    }
                    lock (stateLock)
                    {
                        tmpCount = count;
                    }
                    this.successJobsLabel.Text = tmpCount.ToString();
                    break;

                case StatType.Failure:
                    if (this.InvokeRequired)
                    {
                        this.failedJobsLabel.Invoke(new Action<StatType, int>(updateStats), new object[] { statType, count });
                    }
                    lock (stateLock)
                    {
                        tmpCount = count;
                    }
                    this.failedJobsLabel.Text = count.ToString();
                    break;
            }
        }
开发者ID:Microsoft,项目名称:Dynamics-AX-Integration,代码行数:55,代码来源:DIXFRecurringJobsProcessor.cs


示例16: HasOnly

 public bool HasOnly(StatType type)
 {
     if ((type != StatType.Health && Health > 0)
         || (type != StatType.Attack && Attack > 0)
         || (type != StatType.Defence && Defence > 0)
         || (type != StatType.SpAttack && SpAttack > 0)
         || (type != StatType.SpDefence && SpDefence > 0)
         || (type != StatType.Speed && Speed > 0))
     {
         return false;
     }
     return true;
 }
开发者ID:Rympex,项目名称:proshine,代码行数:13,代码来源:PokemonStats.cs


示例17: Damage

        public Damage(DamageType type, StatType damageTo, int value, bool trigger = true, bool penetrate=false)
        {
            Type = type;

            if (damageTo == StatType.CUR_ENERGY ||
                damageTo == StatType.CUR_STAMINA)
                DamageTo = damageTo;
            else DamageTo = StatType.CUR_LIFE;

            Value = value;
            Trigger = trigger;
            Penetrate = penetrate;
        }
开发者ID:InferiorOlive,项目名称:AIQuest,代码行数:13,代码来源:Damage.cs


示例18: Add

        public Stat Add(StatType type, float baseValue, bool isDynamic)
        {
            Stat stat = null;

            if (isDynamic)
                stat = new DynamicStat(type, baseValue);
            else
                stat = new Stat(type, baseValue);

            stats.Add(stat.Type, stat);

            return stat;
        }
开发者ID:Rupini,项目名称:Hexocracy,代码行数:13,代码来源:StatsHolder.cs


示例19: TryConvert

		public static bool TryConvert(this StatFlags flags, out StatType stats)
		{
			stats = StatType.All;

			var f = (byte)flags;

			if (f < 0x1 || f > 0x7)
			{
				return false;
			}

			stats = (StatType)flags;
			return true;
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:14,代码来源:StatFlags.cs


示例20: StatOffsetSetMod

		public StatOffsetSetMod(
			string uid = null,
			string name = "Stat Mod",
			int partsReq = 1,
			bool display = true,
			StatType stat = StatType.All,
			int offset = 1,
			TimeSpan? duration = null)
			: base(name, null, partsReq, display)
		{
			UID = uid ?? Name + TimeStamp.UtcNow;

			_Stat = stat;
			_Offset = offset;
			_Duration = duration ?? TimeSpan.Zero;

			InvalidateDesc();
		}
开发者ID:Ravenwolfe,项目名称:Core,代码行数:18,代码来源:StatOffset.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# State类代码示例发布时间:2022-05-24
下一篇:
C# Stat类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap