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


C# Hero.AddParticleEffect方法代码示例

本文整理汇总了C#中Hero.AddParticleEffect方法的典型用法代码示例。如果您正苦于以下问题:C# Hero.AddParticleEffect方法的具体用法?C# Hero.AddParticleEffect怎么用?C# Hero.AddParticleEffect使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Hero的用法示例。


在下文中一共展示了Hero.AddParticleEffect方法的11个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CastRaze

 private static void CastRaze(int number, Hero target)
 {
     var raze = shadowRaze[number];
     if (raze != null && raze.CanBeCasted() && me.CanCast() && Utils.SleepCheck("raze"))
     {
         if (onlyKills)
         {
             var dmg = CheckRazeDamage(number, target);
             if (!(dmg >= target.Health))
             {
                 return;
             }
         }
         //
         ParticleEffect eff = target.AddParticleEffect("particles/items_fx/aura_shivas.vpcf");
         new Timer(new TimerCallback(delegate(object e)
         {
             eff.Dispose();
         }), null, 1000, 0);
         //
         me.Attack(target);
         raze.UseAbility();
         Utils.Sleep(800 + (Game.Ping/1000), "raze");
     }
 }
开发者ID:aleksanmer,项目名称:SFKEY,代码行数:25,代码来源:SF.cs

示例2: Tick

 public static void Tick(EventArgs args)
 {
     if (!Game.IsInGame || Game.IsWatchingGame)
         return;
     me = ObjectMgr.LocalHero;
     if (me == null)
         return;
     if (me.ClassID == ClassID.CDOTA_Unit_Hero_Meepo)
     {
         List<Hero> meepo = ObjectMgr.GetEntities<Hero>().Where(x => x.Team == me.Team && x.Name == me.Name).ToList();
         uint i = 0;
         foreach(Hero m in meepo)
         {
             i++;
             if (m.IsAlive)
             {
                 if (rangedisplay_meepo[i] == null)
                     rangedisplay_meepo[i] = m.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
                 if (rangedisplay_meepo[i].GetHighestControlPoint() != 2)
                 {
                     rangedisplay_meepo[i] = m.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
                     rangedisplay_meepo[i].SetControlPoint(1, new Vector3(255, 255, 0));
                     rangedisplay_meepo[i].SetControlPoint(2, new Vector3(_range_exp, 255    , 0));
                 }
             }
             else
                 rangedisplay_meepo[i].Dispose();
         }
     }
     else
     {
         if (me.IsAlive)
         {
             if (rangedisplay == null)
                 rangedisplay = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
             if (rangedisplay.GetHighestControlPoint() != 2)
             {
                 rangedisplay = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
                 rangedisplay.SetControlPoint(1, new Vector3(255, 255, 0));
                 rangedisplay.SetControlPoint(2, new Vector3(_range_exp, 255, 0));
             }
         }
         else
             rangedisplay.Dispose();
     }
 }
开发者ID:jaddyknight,项目名称:EnsageSharp,代码行数:46,代码来源:EXP_RANGE.cs

示例3: HandleEffect

 static void HandleEffect(Hero hero)
 {
     if (hero.IsVisibleToEnemies)
     {
         ParticleEffect effect;
         if (!Effects.TryGetValue(hero, out effect))
         {
             effect = hero.AddParticleEffect("aura_shivas");
             Effects.Add(hero, effect);
         }
     }
     else
     {
         ParticleEffect effect;
         if (Effects.TryGetValue(hero, out effect))
         {
             effect.Dispose();
             Effects.Remove(hero);
         }
     }
 }
开发者ID:theklausnomi,项目名称:Ensage,代码行数:21,代码来源:Program.cs

示例4: DisplayRange

        //Nampilkan attack range
        private static void DisplayRange()
        {
            if (!Game.IsInGame)
                return;

            foreach (var e in Effects)
            {
                e.Dispose();
            }
            Effects.Clear();
            me = ObjectMgr.LocalHero;
            var player = ObjectMgr.LocalPlayer;
            rangeDisplay = null;
            if (player == null)
                return;
            var towers =
                ObjectMgr.GetEntities<Building>()
                    .Where(x => x.IsAlive && x.ClassID == ClassID.CDOTA_BaseNPC_Tower)
                    .ToList();
            if (!towers.Any())
                return;
            if (rangeDisplay == null)
            {
                rangeDisplay = me.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf");
                lastRange = me.GetAttackRange() + me.HullRadius + 25;
                rangeDisplay.SetControlPoint(1, new Vector3(lastRange, 0, 0));
            }
            else
            {
                if (lastRange != (me.GetAttackRange() + me.HullRadius + 25))
                {
                    lastRange = me.GetAttackRange() + me.HullRadius + 25;
                    rangeDisplay.Dispose();
                    rangeDisplay = me.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf");
                    rangeDisplay.SetControlPoint(1, new Vector3(lastRange, 0, 0));
                }
            }
            if (player.Team == Team.Observer)
            {
                foreach (var effect in towers.Select(tower => tower.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf")))
                {
                    effect.SetControlPoint(1, new Vector3(850, 0, 0));
                    Effects.Add(effect);
                }
            }
            else
            {
                if (enemyTowers)
                {
                    foreach (var effect in towers.Where(x => x.Team != player.Team).Select(tower => tower.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf")))
                    {
                        effect.SetControlPoint(1, new Vector3(850, 0, 0));
                        Effects.Add(effect);
                    }
                }
                if (ownTowers)
                {
                    foreach (var effect in towers.Where(x => x.Team == player.Team).Select(tower => tower.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf")))
                    {
                        effect.SetControlPoint(1, new Vector3(850, 0, 0));
                        Effects.Add(effect);
                    }
                }
            }
        }
开发者ID:argosptr,项目名称:Teh-Pucuk,代码行数:66,代码来源:Program.cs

示例5: FriendlyVisible

 public static void FriendlyVisible(Hero target)
 {
     if (target.IsVisibleToEnemies)
     {
         if (Utils.SleepCheck("particleEffect" + target.Player.Name))
         {
             target.AddParticleEffect(Variables.visibleParticleEffect);
             Utils.Sleep(500,"particleEffect" + target.Player.Name);
         }
     }
 }
开发者ID:rockeytony,项目名称:Pudge-Plus,代码行数:11,代码来源:ESP.cs

示例6: DrawRanges

        public static void DrawRanges(EventArgs args)
        {
			if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame || !Utils.SleepCheck("VisibilitySleep"))
				return;
			//Utils.Sleep(150, "VisibilitySleep");
				
            me = ObjectMgr.LocalHero;
            if (me == null || me.ClassID != ClassID.CDOTA_Unit_Hero_Tinker)
                return;
		
			aether = me.FindItem("item_aether_lens");
			
			if (aether == null)
				aetherrange = 0;
			else
				aetherrange = 200;
		
			

			if (Menu.Item("Show Direction").GetValue<bool>())
			{
				/*
				ParticleEffect effect3;
						
				if (me.IsChanneling() && !Prediction.IsTurning(me))
				{
					if (VisibleUnit3.TryGetValue(me, out effect3)) return;
					effect3 = me.AddParticleEffect(@"particles\ui_mouseactions\range_finder_directional_b.vpcf");
					effect3.SetControlPoint(1, me.Position);
					effect3.SetControlPoint(2, FindVector(me.Position, me.Rotation, 1200+aetherrange));
					VisibleUnit3.Add(me, effect3);
				}
				else if (!me.IsChanneling())
				{
					if (!VisibleUnit3.TryGetValue(me, out effect3)) return;
					effect3.Dispose();
					VisibleUnit3.Remove(me);
				}*/
				
				
				if (me.IsChanneling())// && !Prediction.IsTurning(me))
				{
					if (effect3 == null)
					{
						//effect3 = new ParticleEffect(@"particles\ui_mouseactions\range_finder_directional_b.vpcf", me);     
						effect3 = new ParticleEffect(@"particles\ui_mouseactions\range_finder_d_glow.vpcf", me);     
						
						effect3.SetControlPoint(1, me.Position);
						effect3.SetControlPoint(2, FindVector(me.Position, me.Rotation, 1200+aetherrange + ensage_error));
					}
					else 
					{
						effect3.SetControlPoint(1, me.Position);
						effect3.SetControlPoint(2, FindVector(me.Position, me.Rotation, 1200+aetherrange + ensage_error));
					} 
				}
				else if (effect3 != null)
				{
				   effect3.Dispose();
				   effect3 = null;
				}  
				
			}
			

			
			
			if (Menu.Item("Show Target Effect").GetValue<bool>())
			{
				if (target != null && target.IsValid && !target.IsIllusion && target.IsAlive && target.IsVisible && me.Distance2D(target.Position) < 2000)
				{
					if (effect4 == null)
					{
						effect4 = new ParticleEffect(@"particles\ui_mouseactions\range_finder_tower_aoe.vpcf", target);     
						effect4.SetControlPoint(2, me.Position);
						effect4.SetControlPoint(6, new Vector3(1, 0, 0));
						effect4.SetControlPoint(7, target.Position);
					}
					else 
					{
						effect4.SetControlPoint(2, me.Position);
						effect4.SetControlPoint(6, new Vector3(1, 0, 0));
						effect4.SetControlPoint(7, target.Position);
					} 
				}
				else if (effect4 != null)
				{
				   effect4.Dispose();
				   effect4 = null;
				}  
			}
			
			/*
			{
				if (linedisplay == null)
				{
					linedisplay = me.AddParticleEffect(@"particles\ui_mouseactions\range_finder_directional_b.vpcf");
					linedisplay.SetControlPoint(1, me.Position);
					linedisplay.SetControlPoint(2, FindVector(me.Position, me.Rotation, 1200+aetherrange));
				}
//.........这里部分代码省略.........
开发者ID:Air13,项目名称:ESharp,代码行数:101,代码来源:Tinker_Air13.cs

示例7: Main

        private static void Main()
        {

			
		    if (!Game.IsInGame || Game.IsWatchingGame)
                return;
            me = ObjectMgr.LocalHero;
            if (me == null)
                return;
				
			var dagger = new MenuItem("menurange_dagger", "BLINK DAGGER (cyan)").SetValue(true);
			var aura = new MenuItem("menurange_aura", "AURA (blue)").SetValue(true);
			var atck = new MenuItem("menurange_atck", "ATTACK (red)").SetValue(true);
			var exp = new MenuItem("menurange_exp", "EXP (gray)").SetValue(true);
			var own = new MenuItem("menurange_own", "YOUR 1st RANGE (green)").SetValue(true);
			var own2 = new MenuItem("menurange_own2", "YOUR 2nd RANGE (white)").SetValue(true);
			var own3 = new MenuItem("menurange_own3", "YOUR 3rd RANGE (yellow)").SetValue(true);
			var own_amount = new MenuItem("menurange_own_amount", "Set your 1st range").SetValue(new Slider(260, 100, 400));
			var own_amount2 = new MenuItem("menurange_own_amount2", "Set your 2nd range").SetValue(new Slider(400, 600, 835));
			var own_amount3 = new MenuItem("menurange_own_amount3", "Set your 3rd range").SetValue(new Slider(835, 835, 2500));
 
			menurange_dagger = dagger.GetValue<bool>();
            menurange_aura = aura.GetValue<bool>();
			menurange_exp = exp.GetValue<bool>();
			menurange_atck = atck.GetValue<bool>();
			menurange_own = own.GetValue<bool>();
			menurange_own2 = own2.GetValue<bool>();
			menurange_own3 = own3.GetValue<bool>();
			menurange_own_amount = own_amount.GetValue<Slider>().Value; 
			menurange_own_amount2 = own_amount2.GetValue<Slider>().Value; 
			menurange_own_amount3 = own_amount3.GetValue<Slider>().Value; 

            dagger.ValueChanged += MenuItem_ValueChanged;
            aura.ValueChanged += MenuItem_ValueChanged;
			exp.ValueChanged += MenuItem_ValueChanged;
			atck.ValueChanged += MenuItem_ValueChanged;
			own.ValueChanged += MenuItem_ValueChanged;
			own2.ValueChanged += MenuItem_ValueChanged;
			own3.ValueChanged += MenuItem_ValueChanged;
			

            Menu.AddItem(dagger.SetTooltip("Show range of Blink Dagger at 1200 range (Aether lens supported - reload script to apply new range)"));
            Menu.AddItem(aura.SetTooltip("Show range of most items with aura at 900 range"));
			Menu.AddItem(atck.SetTooltip("Attack range (if u have dragon lance or change range attack - reload script to apply new range)"));
			Menu.AddItem(exp.SetTooltip("Show range of gained expierence at 1300"));
			
			Menu.AddItem(own.SetTooltip("Allow to set your 1st own range at slider below. Better use it for small ranges"));
			Menu.AddItem(own_amount);
			Menu.AddItem(own2.SetTooltip("Allow to set your 2nd own range at slider below. Better use it for mid ranges"));
			Menu.AddItem(own_amount2);
			Menu.AddItem(own3.SetTooltip("Allow to set your 3rd own range at slider below. Better use it for big ranges"));
			Menu.AddItem(own_amount3);

            Menu.AddToMainMenu(); 
			
			
		
			if(rangedisplay_aura == null)
				  rangedisplay_aura = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
				if (menurange_aura)
				{	
					range_aura = 900 + 130;
                    rangedisplay_aura.SetControlPoint(1, new Vector3(100, 100, 255));
					rangedisplay_aura.SetControlPoint(2, new Vector3(range_aura, 255, 0));
				}
				
				
			if(rangedisplay_exp == null)
                  rangedisplay_exp = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
				if (menurange_exp)
				{
					range_exp = 1300 + 130;
                    rangedisplay_exp.SetControlPoint(1, new Vector3(111, 111, 111));
					rangedisplay_exp.SetControlPoint(2, new Vector3(range_exp, 255, 0));
				}
				
				
				
				
			if (menurange_own)
			{
				if(rangedisplay_own == null)
				{
					rangedisplay_own = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
				    range_own = menurange_own_amount;
                    rangedisplay_own.SetControlPoint(1, new Vector3(0, 255, 0));
					rangedisplay_own.SetControlPoint(2, new Vector3(range_own+range_own/4, 255, 0));
				}

			}
			
			if (menurange_own2)
			{
				if(rangedisplay_own2 == null)
				{
					rangedisplay_own2 = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
				    range_own2 = menurange_own_amount2;
                    rangedisplay_own2.SetControlPoint(1, new Vector3(255, 255, 255));
					rangedisplay_own2.SetControlPoint(2, new Vector3(range_own2+range_own2/6, 255, 0));
				}
//.........这里部分代码省略.........
开发者ID:Air13,项目名称:ESharp,代码行数:101,代码来源:Self+Ranger+Air13+Fast.cs

示例8: DrawRange

        public static void DrawRange(Hero hero, string name, bool visible, int bonus = 0, bool customRange = false) {
            var ability = hero.FindAbility(name);

            if (ability == null && !customRange)
                return;

            var key = hero.Name + name;

            if (visible) {
                particleEffect = hero.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
                ParticleDictionary.Add(key, particleEffect);

                particleEffect.SetControlPoint(1, new Vector3(
                    MainMenu.Menu.Item(key + "red").GetValue<Slider>().Value,
                    MainMenu.Menu.Item(key + "green").GetValue<Slider>().Value,
                    MainMenu.Menu.Item(key + "blue").GetValue<Slider>().Value));

                particleEffect.SetControlPoint(2,
                    new Vector3(
                        (ability.GetRealCastRange(key, customRange) +
                         (bonus != 0 ? bonus : MainMenu.Menu.Item(key + "bonus").GetValue<Slider>().Value)) * -1,
                        255, 0));
            } else {
                DisposeRange(key);
            }
        }
开发者ID:RetiredQQ,项目名称:Ensage,代码行数:26,代码来源:Drawings.cs

示例9: DrawRanges

		public static void DrawRanges(EventArgs args)
        {
			if (!Game.IsInGame || Game.IsWatchingGame)// || me.ClassID != ClassID.CDOTA_Unit_Hero_Nevermore)
                return;
            me = ObjectMgr.LocalHero;
            if (me == null)
                return;
		
			if (menurange_coil)
			{

				if (rangedisplay_coilQ == null)
				{

					rangedisplay_coilQ = new ParticleEffect(@"particles\ui_mouseactions\range_finder_directional_b.vpcf", me);     
					rangedisplay_coilQ.SetControlPoint(1, me.NetworkPosition);
					rangedisplay_coilQ.SetControlPoint(2, FindVector(me.NetworkPosition, me.Rotation, 700));


				}
				else 
				{
					rangedisplay_coilQ.SetControlPoint(1, me.NetworkPosition);
					rangedisplay_coilQ.SetControlPoint(2, FindVector(me.NetworkPosition, me.Rotation, 700));
				} 

	
			}
			else if (rangedisplay_coilQ!=null)
			{
				rangedisplay_coilQ.Dispose();
				rangedisplay_coilQ = null;
			}			
			
			
			
		
		
		
		
		
			if (menurange_atck)
			{
				if(rangedisplay_atck == null)
				{
					rangedisplay_atck = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");	
					range_atck = me.GetAttackRange() + 100;					
					rangedisplay_atck.SetControlPoint(1, new Vector3(255, 0, 0));
					rangedisplay_atck.SetControlPoint(2, new Vector3(range_atck, 255, 0));
				}
				
				if (range_atck != (me.GetAttackRange() + 100))
				{
					range_atck = me.GetAttackRange() + 100;
					rangedisplay_atck.Dispose();
					rangedisplay_atck = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
					rangedisplay_atck.SetControlPoint(1, new Vector3(255, 0, 0));
					rangedisplay_atck.SetControlPoint(2, new Vector3(range_atck, 255, 0));
				}
			}
			else if (rangedisplay_atck!=null)
			{
				rangedisplay_atck.Dispose();
				rangedisplay_atck = null;
			}

		


				
			if (menurange_dagger)
			{
				var aether = me.FindItem("item_aether_lens");
				var aetherrange = 0;
				if (aether == null)
					aetherrange = 0;
				else
					aetherrange = 200;
			
				if (me.FindItem("item_blink")!=null)
				{	
					if(rangedisplay_dagger == null)
					{
						rangedisplay_dagger = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
						range_dagger = 1200  + aetherrange + 130;
						rangedisplay_dagger.SetControlPoint(1, new Vector3(150, 255, 255));
						rangedisplay_dagger.SetControlPoint(2, new Vector3(range_dagger, 255, 0));
					}
					if (range_dagger != 1200  + aetherrange + 130)
					{
						range_dagger = 1200  + aetherrange + 130;
						if(rangedisplay_dagger != null)
							rangedisplay_dagger.Dispose();
						rangedisplay_dagger = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
						rangedisplay_dagger.SetControlPoint(1, new Vector3(150, 255, 255));
						rangedisplay_dagger.SetControlPoint(2, new Vector3(range_dagger, 255, 0));
					}
				}
				
                else
//.........这里部分代码省略.........
开发者ID:Air13,项目名称:ESharp,代码行数:101,代码来源:ShadowFiendHelper+Air13.cs

示例10: Drawing_OnDraw

        private static void Drawing_OnDraw(EventArgs args)
        {
            me = ObjectMgr.LocalHero;
            if (!menuadded) return;
            ParticleEffect scope;

            #region target draw

            if (target != null && target.IsAlive && !target.IsInvul())
            {
                if (Menu.Item("drawtargetglow").GetValue<bool>())
                    for (var i = 50; i < 52; i++)
                    {
                        if (Effect.TryGetValue(i, out scope)) continue;
                        heronametargeted = target.NetworkName;
                        heronametargeted = heronametargeted.Replace("CDOTA_Unit_Hero_", "");
                        scope =
                            target.AddParticleEffect(
                                @"particles\units\heroes\hero_beastmaster\beastmaster_wildaxe_glow.vpcf");
                        scope.SetControlPoint(1, new Vector3(200, 0, 0));
                        Effect.Add(i, scope);
                    }
            }
            if (target == null || !target.IsAlive || target.IsInvul() ||
                !Menu.Item("drawtargetglow").GetValue<bool>() ||
                target.NetworkName.Replace("CDOTA_Unit_Hero_", "") != heronametargeted)
            {
                for (var i = 50; i < 52; i++)
                {
                    if (!Effect.TryGetValue(i, out scope)) continue;
                    scope.Dispose();
                    Effect.Remove(i);
                }
            }

            #endregion

            #region blink ready glow

            if (Menu.Item("drawblinkready").GetValue<bool>())
            {
                if (blink != null && blink.Cooldown == 0)
                {
                    for (var l = 30; l < 34; l++)
                    {
                        if (!Effect.TryGetValue(l, out effect))
                        {
                            effect =
                                me.AddParticleEffect(
                                    @"particles\econ\courier\courier_baekho\courier_baekho_ambient_glow.vpcf");
                            effect.SetControlPoint(1, new Vector3(200, 0, 0));
                            Effect.Add(l, effect);
                        }
                    }
                }

                if (blink == null || (blink != null && blink.Cooldown > 0))
                {
                    for (var l = 30; l < 34; l++)
                    {
                        if (Effect.TryGetValue(l, out effect))
                        {
                            effect.Dispose();
                            Effect.Remove(l);
                        }
                    }
                }
            }
            else
                for (var l = 30; l < 34; l++)
                {
                    if (Effect.TryGetValue(l, out effect))
                    {
                        effect.Dispose();
                        Effect.Remove(l);
                    }
                }

            #endregion

            if (realWrange != Wdrawn)
            {
                Wdrawn = realWrange;
                if (Effect.TryGetValue(1, out effect))
                {
                    effect.Dispose();
                    Effect.Remove(1);
                }
                if (!Effect.TryGetValue(1, out effect))
                {
                    effect = me.AddParticleEffect(@"particles\ui_mouseactions\range_display.vpcf");
                    effect.SetControlPoint(1, new Vector3(realWrange, 0, 0));
                    Effect.Add(1, effect);
                }
            }

            if (Menu.Item("drawWrange").GetValue<bool>())
            {
                if (!Effect.TryGetValue(1, out effect))
                {
//.........这里部分代码省略.........
开发者ID:Evervolv1337,项目名称:Ensage,代码行数:101,代码来源:Program.cs

示例11: Main

        private static void Main(string[] args)
        {

			
		    if (!Game.IsInGame || Game.IsPaused || Game.IsWatchingGame)
                return;
            me = ObjectMgr.LocalHero;
            if (me == null)
                return;
				
			var dagger = new MenuItem("menurange_dagger", "BLINK DAGGER (cyan)").SetValue(true);
			var aura = new MenuItem("menurange_aura", "AURA (blue)").SetValue(true);
			var atck = new MenuItem("menurange_atck", "ATTACK (red)").SetValue(true);
			var exp = new MenuItem("menurange_exp", "EXP (white)").SetValue(true);
			var own = new MenuItem("menurange_own", "YOUR 1st RANGE (green)").SetValue(true);
			var own2 = new MenuItem("menurange_own2", "YOUR 2nd RANGE (yellow)").SetValue(true);
			var own_amount = new MenuItem("menurange_own_amount", "Set your 1st range").SetValue(new Slider(260, 100, 2500));
			var own_amount2 = new MenuItem("menurange_own_amount2", "Set your 2nd range").SetValue(new Slider(600, 100, 2500));
			
 
			menurange_dagger = dagger.GetValue<bool>();
            menurange_aura = aura.GetValue<bool>();
			menurange_exp = exp.GetValue<bool>();
			menurange_atck = atck.GetValue<bool>();
			menurange_own = own.GetValue<bool>();
			menurange_own2 = own2.GetValue<bool>();
			menurange_own_amount = own_amount.GetValue<Slider>().Value; 
			menurange_own_amount2 = own_amount2.GetValue<Slider>().Value; 

            dagger.ValueChanged += MenuItem_ValueChanged;
            aura.ValueChanged += MenuItem_ValueChanged;
			exp.ValueChanged += MenuItem_ValueChanged;
			atck.ValueChanged += MenuItem_ValueChanged;
			own.ValueChanged += MenuItem_ValueChanged;
			own2.ValueChanged += MenuItem_ValueChanged;
			

            Menu.AddItem(dagger.SetTooltip("Show range of Blink Dagger at 1200 range (Aether lens supported - reload script to apply new range)"));
            Menu.AddItem(aura.SetTooltip("Show range of most items with aura at 900 range"));
			Menu.AddItem(atck.SetTooltip("Attack range (if u have dragon lance or change range attack - reload script to apply new range)"));
			Menu.AddItem(exp.SetTooltip("Show range of gained expierence at 1300"));
			
			Menu.AddItem(own.SetTooltip("Allow to set your 1st own range at slider below. Use it for hero's spells"));
			Menu.AddItem(own_amount);
			Menu.AddItem(own2.SetTooltip("Allow to set your 2nd own range at slider below. Use it for hero's spells"));
			Menu.AddItem(own_amount2);

            Menu.AddToMainMenu(); 
			
			
			if(rangedisplay_aura == null)
				  rangedisplay_aura = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
				if (menurange_aura)
				{	
					range_aura = 900 + 50 + 80;
                    rangedisplay_aura.SetControlPoint(1, new Vector3(0, 0, 255));
					rangedisplay_aura.SetControlPoint(2, new Vector3(range_aura, 255, 0));
				}
				
				
			if(rangedisplay_exp == null)
                  rangedisplay_exp = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
				if (menurange_exp)
				{
					range_exp = 1300 + 50 + 80;
                    rangedisplay_exp.SetControlPoint(1, new Vector3(255, 255, 255));
					rangedisplay_exp.SetControlPoint(2, new Vector3(range_exp, 255, 0));
				}
				
				
			if (menurange_own)
			{
				if(rangedisplay_own == null)
				{
					rangedisplay_own = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
				    range_own = menurange_own_amount;
					//range_spell = 260 + 60;
					//range_item = 1300 + 130;
                    rangedisplay_own.SetControlPoint(1, new Vector3(0, 255, 0));
					rangedisplay_own.SetControlPoint(2, new Vector3(range_own + 60, 255, 0));
				}

			}
			
			if (menurange_own2)
			{
				if(rangedisplay_own2 == null)
				{
					rangedisplay_own2 = me.AddParticleEffect(@"particles\ui_mouseactions\drag_selected_ring.vpcf");
				    range_own2 = menurange_own_amount2;
					//range_spell = 260 + 60;
					//range_item = 1300 + 130;
                    rangedisplay_own2.SetControlPoint(1, new Vector3(255, 255, 0));
					rangedisplay_own2.SetControlPoint(2, new Vector3(range_own2 + 60, 255, 0));
				}

			}
				

				
//.........这里部分代码省略.........
开发者ID:Air13,项目名称:ESharp,代码行数:101,代码来源:Self+Ranger+Air13.cs


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