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

C# Spell类代码示例

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

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



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

示例1: SpellShapeshiftFormSelector

 public SpellShapeshiftFormSelector(Spell spell, bool stance)
 {
     InitializeComponent();
     _spell = spell;
     _stance = stance;
     Load();
 }
开发者ID:shilvasa,项目名称:LegacyToolBox,代码行数:7,代码来源:SpellShapeshiftFormSelector.xaml.cs


示例2: Do

    public override void Do(Mage caster, Spell origin_spell)
    {
        SEDispelOldestSlot dispel = Instantiate(this);
        dispel.StartCoroutine(dispel.UpdateDispel(caster));

        base.Do(caster, origin_spell);
    }
开发者ID:RPITeamTree,项目名称:Spelleo_RGS2015,代码行数:7,代码来源:SEDispelOldestSlot.cs


示例3: Start

 public void Start()
 {
     player = GameMainReferences.Instance.PlayerCharacter;
     _spell = player.GetSpellAtIndex(_spellIndex);
     ChangeSpellIcon(_spell);
     player.OnSpellChanged += OnSpellChanged;
 }
开发者ID:Barabicus,项目名称:ATOMFIACHRA,代码行数:7,代码来源:SpellButton.cs


示例4: Input

 public Input(Obj_AI_Base _target, Spell s, Vector3 _from, Vector3 _rangeCheckFrom)
 {
     Target = _target;
     SpellDelay = s.Delay;
     SpellMissileSpeed = s.Speed;
     SpellWidth = s.Width;
     SpellRange = s.Range;
     SpellCollisionable = s.Collision;
     SpellSkillShotType = s.Type;
     Path = Target.GetWaypoints();
     if (Target is Obj_AI_Hero)
     {
         Obj_AI_Hero t = Target as Obj_AI_Hero;
         AvgReactionTime = t.AvgMovChangeTime();
         LastMovChangeTime = t.LastMovChangeTime();
         AvgPathLenght = t.AvgPathLenght();
     }
     else
     {
         AvgReactionTime = 0;
         LastMovChangeTime = 0;
         AvgPathLenght = 0;
     }
     From = _from;
     RangeCheckFrom = _rangeCheckFrom;
 }
开发者ID:MrWenzoxfs,项目名称:elobuddy,代码行数:26,代码来源:Prediction.cs


示例5: CureMezzSpellHandler

 // constructor
 public CureMezzSpellHandler(GameLiving caster, Spell spell, SpellLine line)
     : base(caster, spell, line)
 {
     // RR4: now it's a list
     m_spellTypesToRemove = new List<string>();
     m_spellTypesToRemove.Add("Mesmerize");
 }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:8,代码来源:Curemezz.cs


示例6: TriggerSpellRefresh

 /// <summary>
 /// Triggers a spell refresh event. The spell refresh indicates that the spells destroy timer has been refreshed. 
 /// Typically this will be an attached spell refreshing the timer.
 /// </summary>
 /// <param name="obj"></param>
 private void TriggerSpellRefresh(Spell obj)
 {
     if(OnSpellRefresh != null)
     {
         OnSpellRefresh();
     }
 }
开发者ID:Barabicus,项目名称:ATOMFIACHRA,代码行数:12,代码来源:EffectSetting.cs


示例7: SpellDamage

 public SpellDamage(Spell.SpellBase spell, float[] spellDamageValue, float[] spellDamageModifier, DamageType damageType)
 {
     Spell = spell;
     SpellDamageValue = spellDamageValue;
     SpellDamageModifier = spellDamageModifier;
     DamageType = damageType;
 }
开发者ID:WujuSan,项目名称:Elobuddy-1,代码行数:7,代码来源:SpellDamage.cs


示例8: MagicInfo

        public MagicInfo (BinaryReader reader, int version = int.MaxValue, int Customversion = int.MaxValue)
        {
            Name = reader.ReadString();
            Spell = (Spell)reader.ReadByte();
            BaseCost = reader.ReadByte();
            LevelCost = reader.ReadByte();
            Icon = reader.ReadByte();
            Level1 = reader.ReadByte();
            Level2 = reader.ReadByte();
            Level3 = reader.ReadByte();
            Need1 = reader.ReadUInt16();
            Need2 = reader.ReadUInt16();
            Need3 = reader.ReadUInt16();
            DelayBase = reader.ReadUInt32();
            DelayReduction = reader.ReadUInt32();
            PowerBase = reader.ReadUInt16();
            PowerBonus = reader.ReadUInt16();
            MPowerBase = reader.ReadUInt16();
            MPowerBonus = reader.ReadUInt16();

            if (version > 66)
                Range = reader.ReadByte();
            if (version > 70)
            {
                MultiplierBase = reader.ReadSingle();
                MultiplierBonus = reader.ReadSingle();
            }
        }
开发者ID:Pete107,项目名称:Mir2,代码行数:28,代码来源:MagicInfo.cs


示例9: SearingPetEffect

        private int currentTick = 0;		// Count ticks

        public SearingPetEffect(GamePlayer owner)
            : base(RealmAbilities.SearingPetAbility.DURATION)
        {
            EffectOwner = owner;

            // Build spell
            DBSpell tSpell = new DBSpell();
            tSpell.AllowAdd = false;
            tSpell.Description = "Damage the target.";
            tSpell.Name = "PBAoE damage";
            tSpell.Target = "Enemy";
            tSpell.Radius = 0;
            tSpell.Range = WorldMgr.VISIBILITY_DISTANCE;
            tSpell.CastTime = 0;
            tSpell.Duration = 0;
            tSpell.Frequency = 0;
            tSpell.Pulse = 0;
            tSpell.Uninterruptible = true;
            tSpell.Type = "DirectDamage";
            tSpell.Damage = spellDamage;
            tSpell.DamageType = (int)eDamageType.Heat;
            tSpell.Value = 0;
            tSpell.Icon = 476;			// not official effect
            tSpell.ClientEffect = 476;	// not official effect
            petSpell = new Spell(tSpell, 1);
            petSpellLine = new SpellLine("RAs", "RealmAbilitys", "RealmAbilitys", true);
        }
开发者ID:uvbs,项目名称:Dawn-of-Light-core,代码行数:29,代码来源:SearingPetEffect.cs


示例10: LoadOKTW

        public void LoadOKTW()
        {
            Q = new Spell(SpellSlot.Q);
            E = new Spell(SpellSlot.E);
            W = new Spell(SpellSlot.W);
            R = new Spell(SpellSlot.R);

            Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("AutoWard", "Auto Ward").SetValue(true));
            Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("autoBuy", "Auto buy blue trinket after lvl 6").SetValue(false));
            Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("AutoWardBlue", "Auto Blue Trinket").SetValue(true));
            Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("AutoWardCombo", "Only combo mode").SetValue(true));
            Config.SubMenu("AutoWard OKTW©").AddItem(new MenuItem("AutoWardPink", "Auto VisionWard, OracleLens").SetValue(true));

            foreach (var hero in ObjectManager.Get<Obj_AI_Hero>())
            {
                if (hero.IsEnemy)
                {
                    if (hero.ChampionName == "Rengar")
                        rengar = true;
                    if (hero.ChampionName == "Vayne")
                        Vayne = hero;
                }
            }
            
            Game.OnUpdate += Game_OnUpdate;
            Obj_AI_Base.OnProcessSpellCast += Obj_AI_Base_OnProcessSpellCast;
            GameObject.OnCreate +=GameObject_OnCreate;
            GameObject.OnDelete += GameObject_OnDelete;
        }
开发者ID:MrWenzoxfs,项目名称:elobuddy,代码行数:29,代码来源:OKTWward.cs


示例11: InitPositionInfo

        public static PositionInfo InitPositionInfo(Vector2 pos, float extraDelayBuffer, float extraEvadeDistance, Vector2 lastMovePos, Spell lowestEvadeTimeSpell) //clean this shit up
        {
            var extraDist = Evade.menu.SubMenu("MiscSettings").SubMenu("ExtraBuffers").Item("ExtraCPADistance").GetValue<Slider>().Value;

            var posInfo = canHeroWalkToPos(pos, myHero.MoveSpeed, extraDelayBuffer + Game.Ping, extraDist);
            posInfo.isDangerousPos = CheckDangerousPos(pos, 6);
            posInfo.hasExtraDistance = extraEvadeDistance > 0 ? CheckDangerousPos(pos, extraEvadeDistance) : false;// ? 1 : 0;            
            posInfo.closestDistance = posInfo.distanceToMouse;
            posInfo.intersectionTime = GetIntersectTime(lowestEvadeTimeSpell, myHero.ServerPosition.To2D(), pos);
            posInfo.distanceToMouse = pos.Distance(lastMovePos);
            posInfo.posDistToChamps = GetDistanceToChampions(pos);

            if (Evade.menu.SubMenu("MiscSettings").SubMenu("FastEvade").Item("RejectMinDistance").GetValue<Slider>().Value > 0
            && Evade.menu.SubMenu("MiscSettings").SubMenu("FastEvade").Item("RejectMinDistance").GetValue<Slider>().Value >
                posInfo.closestDistance) //reject closestdistance
            {
                posInfo.rejectPosition = true;
            }

            if (Evade.menu.SubMenu("MiscSettings").SubMenu("ExtraBuffers").Item("MinComfortZone").GetValue<Slider>().Value >
                posInfo.posDistToChamps)
            {
                posInfo.hasComfortZone = false;
            }

            return posInfo;
        }
开发者ID:qktlfflzk,项目名称:Backup5.4,代码行数:27,代码来源:EvadeHelper.cs


示例12: GetAttackRange

	public static TileGroup GetAttackRange(Unit caster, Spell spell)
	{
		List<Tile> AttackRange = new List<Tile>();
		AttackRange.Add(caster.CurrentTile);

		for (int ii = spell.MaxRange; ii > 0; ii--)
		{
			for (int jj = AttackRange.Count - 1; jj >= 0; jj--)
			{
				Tile rootTile = AttackRange[jj];
				foreach (Tile curTile in rootTile.NeighboringTiles.Tiles)
				{
					if (!AttackRange.Contains(curTile))
					{
						AttackRange.Add(curTile);
					}
				}
			}
		}

		for (int ii = AttackRange.Count - 1; ii >= 0; ii--)
		{
			if(Knowledge.NaiveDistance(caster.CurrentTile, AttackRange[ii]) < spell.MinRange)
			{
				AttackRange.RemoveAt(ii);
			}
		}

		return new TileGroup(AttackRange);
	}
开发者ID:WispyMouse,项目名称:Wispy-Tactics,代码行数:30,代码来源:Pathfinding.cs


示例13: SpellState

 public SpellState(Spell spellToTrack, byte priority)
 {
     TrackedSpell = spellToTrack;
     _Cooldown = 0M;
     _ActiveOnTarget = 0M;
     Priority = priority;
 }
开发者ID:LucasPeacecraft,项目名称:rawr,代码行数:7,代码来源:SpellState.cs


示例14: OnGameLoad

      private static void OnGameLoad(EventArgs args)
        {

            if (Player.ChampionName != "Riven") return;
            Game.PrintChat("Hoola Riven - Loaded Successfully, Good Luck! :):)");
            Q = new Spell(SpellSlot.Q);
            W = new Spell(SpellSlot.W);
            E = new Spell(SpellSlot.E, 300);
            R = new Spell(SpellSlot.R, 900);
            R.SetSkillshot(0.25f, 45, 1600, false, SkillshotType.SkillshotCone);

            OnMenuLoad();


            Timer = new Render.Text("Q Expiry =>  " + ((double)(LastQ - Utils.GameTimeTickCount + 3800) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 140, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.MidnightBlue, "calibri");
            Timer2 = new Render.Text("R Expiry =>  " + (((double)LastR - Utils.GameTimeTickCount + 15000) / 1000).ToString("0.0"), (int)Drawing.WorldToScreen(Player.Position).X - 60, (int)Drawing.WorldToScreen(Player.Position).Y + 10, 30, Color.IndianRed, "calibri");

            Game.OnUpdate += OnTick;
            Drawing.OnDraw += Drawing_OnDraw;
            Drawing.OnEndScene += Drawing_OnEndScene;
            Obj_AI_Base.OnProcessSpellCast += OnCast;
            Obj_AI_Base.OnDoCast += OnDoCast;
            Obj_AI_Base.OnDoCast += OnDoCastLC;
            Obj_AI_Base.OnPlayAnimation += OnPlay;
            Obj_AI_Base.OnProcessSpellCast += OnCasting;
            Interrupter2.OnInterruptableTarget += Interrupt;
        }
开发者ID:AristoLOL,项目名称:EloBuddy-1,代码行数:27,代码来源:Program.cs


示例15: Apply

		protected override void Apply()
		{
			var channel = m_aura.Controller as SpellChannel;
			SpellCast origCast = null;
			if (spell == null)
			{
				if (channel != null)
				{
					origCast = channel.Cast;
				}
				else
				{
					origCast = m_aura.Auras.Owner.SpellCast;
				}

				spell = m_spellEffect.TriggerSpell;
				if (spell == null)
				{
					LogManager.GetCurrentClassLogger().Warn("Found invalid periodic TriggerSpell in Spell {0} ({1}) ",
						m_aura.Spell, 
						(uint)m_spellEffect.TriggerSpellId);
					return;
				}
			}

			SpellCast.ValidateAndTriggerNew(spell, m_aura.CasterReference, Owner, Owner, channel, origCast != null ? origCast.UsedItem : null,
				null, m_spellEffect);
		}
开发者ID:NVN,项目名称:WCell,代码行数:28,代码来源:PeriodicTriggerSpell.cs


示例16: RandomEffectAreaSpell

 public RandomEffectAreaSpell(Spell spell, BaseCombatant holder)
     : base(spell, holder)
 {
     Timer = new Timer();
     CurrentEffectCount = 0;
     IsEnding = false;
 }
开发者ID:eickegao,项目名称:Blazera,代码行数:7,代码来源:RandomEffectAreaSpell.cs


示例17: FarmCastCircular

        public virtual Vector3 FarmCastCircular(Spell.Skillshot spell, IEnumerable<Obj_AI_Minion> mobList, int minHit = 2)
        {
            var bestPos = Vector3.Zero;
            var countBestPos = 0;

            foreach (var aiBase in mobList)
            {
                if (countBestPos == 0)
                {
                    bestPos = aiBase.ServerPosition;
                    countBestPos =
                        EntityManager.MinionsAndMonsters.CombinedAttackable.Count(
                            t => t != null && t.IsValidTarget(spell.Radius));
                }
                else
                {
                    var newBestPos = EntityManager.MinionsAndMonsters.CombinedAttackable.Count(
                            t => t != null && t.IsValidTarget(spell.Radius));

                    if (newBestPos <= countBestPos) continue;

                    countBestPos = newBestPos;
                    bestPos = aiBase.ServerPosition;
                }
            }

            return countBestPos >= minHit ? bestPos : Vector3.Zero;
        }
开发者ID:mrarticuno,项目名称:EBHQ,代码行数:28,代码来源:LogicBase.cs


示例18: CanChangeCastingSpeed

		/// <summary>
		/// FIXME this has nothing to do here !
		/// </summary>
		/// <param name="line"></param>
		/// <param name="spell"></param>
		/// <returns></returns>
		public override bool CanChangeCastingSpeed(SpellLine line, Spell spell)
		{
			if (spell.SpellType == "Chamber")
				return false;

			if ((line.KeyName == "Cursing"
				 || line.KeyName == "Cursing Spec"
				 || line.KeyName == "Hexing"
				 || line.KeyName == "Witchcraft")
				&& (spell.SpellType != "ArmorFactorBuff"
					&& spell.SpellType != "Bladeturn"
					&& spell.SpellType != "ArmorAbsorptionBuff"
					&& spell.SpellType != "MatterResistDebuff"
					&& spell.SpellType != "Uninterruptable"
					&& spell.SpellType != "Powerless"
					&& spell.SpellType != "Range"
					&& spell.Name != "Lesser Twisting Curse"
					&& spell.Name != "Twisting Curse"
					&& spell.Name != "Lesser Winding Curse"
					&& spell.Name != "Winding Curse"
					&& spell.Name != "Lesser Wrenching Curse"
					&& spell.Name != "Wrenching Curse"
					&& spell.Name != "Lesser Warping Curse"
					&& spell.Name != "Warping Curse"))
			{
				return false;
			}

			return true;
		}
开发者ID:dudemanvox,项目名称:Dawn-of-Light-Server,代码行数:36,代码来源:ClassWarlock.cs


示例19: DoSpellUnlocked

 public void DoSpellUnlocked(Spell spell, RectTransform overlayEndRect = null)
 {
     var toast = Instantiate(_spellUnlockedPrefab) as SpellUnlockedToast;
     toast.OverlayEndRect = overlayEndRect;
     toast.SetupToast(spell);
     QueueToast(toast);
 }
开发者ID:Barabicus,项目名称:ATOMFIACHRA,代码行数:7,代码来源:UIToast.cs


示例20: SpellCast

    public IEnumerator SpellCast(Spell spell)
    {
        //If not out of mana.
        if (spell.spellManaCost <= Player.Instance.mana)
        {
            SkillsUI.Instance.disableSkill(1);// TMP TEMPORAL
            castingSpell = true;
            Player.Instance.mana -= spell.spellManaCost;

            //Wait for choosen spell cast time.
            Player.Instance.anim.SetBool("InvokeSpell", true);
            yield return new WaitForSeconds(spell.spellCastTime);

            Player.Instance.anim.SetTrigger("SpellNormalAttack");
            Player.Instance.anim.SetBool("InvokeSpell", false);

            //Set up a spell and cast it.
            SpellSetUp(spell);

            SkillsUI.Instance.enableSkill(1);// TMP TEMPORAL
        }

        castingSpell = false;
        yield break;
    }
开发者ID:hefanzhou,项目名称:hogwarts,代码行数:25,代码来源:PlayerCombat.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# Spell.Active类代码示例发布时间:2022-05-24
下一篇:
C# Speed类代码示例发布时间: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