public override void Dispose() { particleManager = null; targetSet = false; base.Dispose(); }
public IWorld(IPhysicWorld PhysicWorld, ICuller Culler, IParticleManager particleManager = null) #endif { if (PhysicWorld == null) { ActiveLogger.LogMessage("Physic World cannot be null", LogLevel.FatalError); Debug.Assert(PhysicWorld != null); throw new Exception("Physic World cannot be null"); } if (Culler == null) { ActiveLogger.LogMessage("Culler cannot be null", LogLevel.FatalError); Debug.Assert(Culler != null); throw new Exception("Culler cannot be null"); } this.particleManager = particleManager; this.PhysicWorld = PhysicWorld; this.CameraManager = new CameraManager(); Dummies = new List <IDummy>(); Lights = new List <ILight>(); Objects = new List <IObject>(); Triggers = new List <ITrigger>(); SoundEmiters3D = new List <ISoundEmitter3D>(); this.Culler = Culler; this.culler.world = this; CleanUpObjectsOnDispose = true; #if WINDOWS this.multThreading = multiThread; #endif }
/// <summary> /// Initializes a new instance of the <see cref="IWorld"/> class. /// </summary> /// <param name="PhysicWorld">The physic world.</param> /// <param name="particleManager">The particle manager.</param> /// <param name="culler">The culler.</param> public I2DWorld(I2DPhysicWorld PhysicWorld, IParticleManager particleManager = null, I2DCuller culler = null) { if (PhysicWorld == null) { ActiveLogger.LogMessage("Physic World cannot be null", LogLevel.FatalError); Debug.Assert(PhysicWorld != null); throw new Exception("Physic World cannot be null"); } if (culler == null) { this.culler = new Simple2DCuller(); } else { this.culler = culler; } this.culler.world = this; this.particleManager = particleManager; this.PhysicWorld = PhysicWorld; Dummies = new List <IDummy>(); Objects = new List <I2DObject>(); SoundEmiters2D = new List <ISoundEmitter2D>(); CleanUpObjectsOnDispose = true; #if !WINDOWS_PHONE && !REACH Lights2D = new List <PloobsEngine.Light2D.Light2D>(); #endif }
protected override void OnActivate() { base.OnActivate(); this.DarkPact = this.Owner.GetAbilityById(AbilityId.slark_dark_pact); this.Pounce = this.Owner.GetAbilityById(AbilityId.slark_pounce); this.ShadowDance = this.Owner.GetAbilityById(AbilityId.slark_shadow_dance); UpdateManager.Subscribe(OnPounce, 20); var factory = this.Config.Hero.Factory; var itemMenu = this.Config.Hero.ItemMenu; this.particle = this.Context.Particle; this.MinimumUltiToggle = factory.Item("Use Ulti?", true); this.MinimumUltiHp = factory.Item("Minimum HP% to Ulti", new Slider(30, 0, 100)); this.DrawPouncePosition = factory.Item("Draw Pounce position", true); this.BloodthornOrchidHeroes = itemMenu.Item("Bloodthorn/Orchid", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.NullifierHeroes = itemMenu.Item("Nullifier", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.AbyssalBladeHeroes = itemMenu.Item("Abyssal Blade", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.InvisHeroes = itemMenu.Item("ShadowBlade / SilverEdge", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); }
public static void RemoveBomb(Unit _Bomb, BombType _Type) { switch (_Type) { case BombType.Stasis: StasisBomb stasisBomb = Config._StasisBombs.FirstOrDefault <StasisBomb>((Func <StasisBomb, bool>)(x => (Entity)x._Unit == (Entity)_Bomb)); if (stasisBomb == null) { break; } if (Config._ParticleManager.HasParticle(stasisBomb._Unit.Handle.ToString())) { Config._ParticleManager.Remove(stasisBomb._Unit.Handle.ToString()); } IParticleManager particleManager1 = Config._ParticleManager; string str1 = "st"; uint handle = stasisBomb._Unit.Handle; string str2 = handle.ToString(); string name1 = str1 + str2; if (particleManager1.HasParticle(name1)) { IParticleManager particleManager2 = Config._ParticleManager; string str3 = "st"; handle = stasisBomb._Unit.Handle; string str4 = handle.ToString(); string name2 = str3 + str4; particleManager2.Remove(name2); } Config._StasisBombs.Remove(stasisBomb); break; case BombType.Land: LandBomb landBomb = Config._LandBombs.FirstOrDefault <LandBomb>((Func <LandBomb, bool>)(x => (Entity)x._Unit == (Entity)_Bomb)); if (landBomb == null) { break; } if (Config._ParticleManager.HasParticle(landBomb._Unit.Handle.ToString())) { Config._ParticleManager.Remove(landBomb._Unit.Handle.ToString()); } Config._LandBombs.Remove(landBomb); BombManager.ReBindLandStacker(_Bomb); break; case BombType.Remote: RemoteBomb remoteBomb = Config._RemoteBombs.FirstOrDefault <RemoteBomb>((Func <RemoteBomb, bool>)(x => (Entity)x._Unit == (Entity)_Bomb)); if (remoteBomb == null) { break; } if (Config._ParticleManager.HasParticle(remoteBomb._Unit.Handle.ToString())) { Config._ParticleManager.Remove(remoteBomb._Unit.Handle.ToString()); } Config._RemoteBombs.Remove(remoteBomb); BombManager.ReBindStacker(_Bomb); break; } }
public Core(IServiceContext context, Configuration configuration) : base(context, configuration.ComboKey) { _targetSelector = context.TargetSelector; _configuration = configuration; _particleManager = Context.Particle; _targetParticleUpdateHandler = UpdateManager.Subscribe(UpdateTargetParticle, 0, false); }
public LevelManager(IEventAggregator eventAggregator, ILevelFactory levelFactory, ICollisionManager collisionManager, IParticleManager particleManager, IDrawer drawer) { _eventAggregator = eventAggregator; _collisionManager = collisionManager; _particleManager = particleManager; _level = levelFactory.CreateLevel(); _drawer = drawer; }
public OrbwalkingMode(IServiceContext context, Settings settings) : base(context, settings.Key) { this.settings = settings; this.particleManager = this.Context.Particle; this.targetSelector = context.TargetSelector; this.poison = new Poison(this.Owner.GetAbilityById(AbilityId.shadow_demon_shadow_poison)); }
public GrimstrokeCombo(Grimstroke hero) : base(hero) { Grimstroke = hero; Entity.OnBoolPropertyChange += this.OnSofCast; particle = this.Context.Particle; this.IllusionHandler = UpdateManager.Run(OnUpdate); this.sofUpdateHandler = UpdateManager.Subscribe(this.SofHitCheck, 0, false); }
private void Start() { rb2d = GetComponent <Rigidbody2D>(); animatorFacade = GetComponentInChildren <IAnimatorFacade>(); stats = GetComponent <Stats>(); audioManager = GetComponent <IAudioManager>(); particleManager = new ParticleManager(dustParticles, trailParticles, transformationParticleSystem, jumpParticlesSystem, racoonParticleSystem); initMovemnts(); movement = movements[MovementType.ground]; }
/// <summary> /// Allows the game to perform any initialization it needs to before starting to run. /// This is where it can query for any required services and load any non-graphic /// related content. Calling base.Initialize will enumerate through any components /// and initialize them as well. /// </summary> protected override void Initialize() { Graphics.PreferredBackBufferWidth = 1280; Graphics.PreferredBackBufferHeight = 720; Graphics.ApplyChanges(); Components.Add(new FrameRateCounter(this, "Content\\debugfont", 1f)); Components.Add(new GameObjectInfoDisplay(this, 5, "Content\\debugfont", new Vector2(0f, 25f))); ComponentFactory componentFactory = new ComponentFactory(); TiledGameObjectFactory gameObjectFactory = new TiledGameObjectFactory(this.Content); gameObjectFactory.PathToXML = "EntityDefinitions\\entity.xml"; inputHandler = new InputHandler(false); playerManager = new PlayerManager(); particleManager = new ParticleManager(Content, "ParticleEffects\\", "Textures\\"); PhysicsManager physicsManager = new PhysicsManager(); particleRenderer = new SpriteBatchRenderer(); particleRenderer.GraphicsDeviceService = Graphics; // Create a new SpriteBatch, which can be used to draw textures. spriteBatch = new SpriteBatch(GraphicsDevice); renderer = new Renderer(Graphics, spriteBatch); renderer.SetInternalResolution(1280, 720); renderer.SetScreenResolution(1280, 720, false); GameServiceManager.AddService(typeof(IGameObjectFactory), gameObjectFactory); GameServiceManager.AddService(typeof(IComponentFactory), componentFactory); GameServiceManager.AddService(typeof(RenderableFactory), new RenderableFactory(this.Content)); GameServiceManager.AddService(typeof(IInputHandler), inputHandler); GameServiceManager.AddService(typeof(PlayerManager), playerManager); GameServiceManager.AddService(typeof(IScoreManager), new ScoreManager()); GameServiceManager.AddService(typeof(IGameObjectManager), new GameObjectManager()); GameServiceManager.AddService(typeof(IPhysicsManager), physicsManager); GameServiceManager.AddService(typeof(IBehaviorFactory), new BehaviorFactory()); GameServiceManager.AddService(typeof(IActionFactory), new ActionFactory()); GameServiceManager.AddService(typeof(IActionManager), new ActionManager()); GameServiceManager.AddService(typeof(ILevelLogicManager), new LevelLogicManager(this.Content)); GameServiceManager.AddService(typeof(IRandomGenerator), new RandomGenerator()); GameServiceManager.AddService(typeof(IParticleManager), particleManager); GameServiceManager.AddService(typeof(IRenderer), renderer); debugView = new DebugViewXNA(GameServiceManager.GetService<IPhysicsManager>().PhysicsWorld); //Initialize the GameServices GameServiceManager.Initialize(); CameraController.Initialize(this); CameraController.MoveCamera(new Vector2(GraphicsDevice.Viewport.Width / 2f, GraphicsDevice.Viewport.Height / 2f)); base.Initialize(); }
public VisageOrbwalking(Key key, Config config) : base(config.bemVisage.Context, key) { Config = config; Main = config.bemVisage; MultiSleeper = config.multiSleeper; TargetSelector = Main.Context.TargetSelector; ParticleManager = Main.Context.Particle; UpdateManager.Subscribe(OnUpdate, 25); }
void Awake() { gridSystem = GetComponent <GridSystem> (); selectorManager = GetComponent <SelectorManager> (); stats = GetComponent <Stats> (); inputManager = GetComponent <IInputManager> (); UImanager = GetComponent <UIManager> (); particleManager = GetComponent <IParticleManager> (); audoisource = GetComponent <AudioSource>(); Instance = this; }
public OrbwalkingMode(IServiceContext context, Settings settings) : base(context, settings.ComboKey) { var abilities = context.AbilityFactory; this.hook = abilities.GetAbility <pudge_meat_hook>(); this.rot = abilities.GetAbility <pudge_rot>(); this.ult = abilities.GetAbility <pudge_dismember>(); this.targetSelector = context.TargetSelector; this.settings = settings; this.particleManager = this.Context.Particle; this.hookUpdateHandler = UpdateManager.Subscribe(this.HookHitCheck, 0, false); this.targetParticleUpdateHandler = UpdateManager.Subscribe(this.UpdateTargetParticle, 0, false); }
protected override void OnActivate() { base.OnActivate(); var factory = this.Config.Hero.Factory; var itemMenu = this.Config.Hero.ItemMenu; this.DrawRazeRange = factory.Item("Draw Raze Indicators", true); this.DrawRazeRange.Item.Tooltip = "When enabled, will draw raze indicators."; this.PriRaze = factory.Item("Make sure razes hit", true); this.PriRaze.Item.Tooltip = "When enabled, will stop razes if not guaranteed hit, but skip some attacks in return."; this.UltiCombo = factory.Item("Ulti Key", new KeyBind(70)); this.UltiCombo.Item.Tooltip = "Will use ulti with available items on target."; this.EullessUlti = factory.Item("Use ulti without eul too", false); this.EullessUlti.Item.Tooltip = "Will use ulti without euls too. Only activate with good ping/fps"; this.DrawingX = factory.Item("Drawing X", new Slider(0, 0, 1800)); this.DrawingY = factory.Item("Drawing Y", new Slider(0, 0, 1800)); this.BkbToggle = itemMenu.Item("Bkb Toggle", new KeyBind(71, KeyBindType.Toggle, true)); this.EtherealHeroes = itemMenu.Item("Ethereal Blade", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.VeilOfDiscordHeroes = itemMenu.Item("Veil Of Discord", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.HexHeroes = itemMenu.Item("Hex", new HeroToggler(new Dictionary <string, bool>(), true, false, false)); this.OrchidBloodthornHeroes = itemMenu.Item("Orchid/Bloodthorn", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.OrchidBloodthornHeroes = itemMenu.Item("Orchid/Bloodthorn", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.AtosHeroes = itemMenu.Item("Rod of Atos", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.HalberdHeroes = itemMenu.Item("Heaven's Halberd", new HeroToggler(new Dictionary <string, bool>(), true, false, true)); this.UseBlink = itemMenu.Item("Use blink in combo?", true); this.Particle = this.Context.Particle; this.Prediction = this.Context.Prediction; UpdateManager.Subscribe(OnUpdate, 20); Unit.OnModifierAdded += this.OnRazeAdded; Unit.OnModifierRemoved += this.OnRazeRemoved; this.Context.RenderManager.Draw += this.OnDraw; this.RazeShort = UnitExtensions.GetAbilityById(this.Owner, AbilityId.nevermore_shadowraze1); this.RazeMedium = UnitExtensions.GetAbilityById(this.Owner, AbilityId.nevermore_shadowraze2); this.RazeLong = UnitExtensions.GetAbilityById(this.Owner, AbilityId.nevermore_shadowraze3); this.Ulti = UnitExtensions.GetAbilityById(this.Owner, AbilityId.nevermore_requiem); }
protected override void OnActivate() { InventoryManager = Context.Value.Inventory; Renderer = Context.Value.Renderer; ParticleManager = Context.Value.Particle; Owner = (Hero)Context.Value.Owner; Updater = new Updater(this); Log.Info("Updater loaded"); Config = new Config(this); Log.Info("Config loaded"); /*InventoryManager.Value.Activate(); * Log.Info("InventoryManager loaded");*/ InitLocalCheats(); }
public static void OnUpdate() { if (Core.Config._Menu.DrawingsMenu.BombsDrawings.RemoteBombRange) { foreach (RemoteBomb remoteBomb in Core.Config._RemoteBombs) { Core.Config._ParticleManager.DrawRange(remoteBomb._Unit, remoteBomb._Unit.Handle.ToString(), 400f, Color.Bisque); } } if (Core.Config._Menu.DrawingsMenu.BombsDrawings.LandBombRange) { foreach (LandBomb landBomb in Core.Config._LandBombs) { Core.Config._ParticleManager.DrawRange(landBomb._Unit, landBomb._Unit.Handle.ToString(), 400f, landBomb.DrawingsColor()); } } foreach (StasisBomb stasisBomb in Core.Config._StasisBombs) { uint handle; if (Core.Config._Menu.DrawingsMenu.BombsDrawings.StasisBombRange) { IParticleManager particleManager = Core.Config._ParticleManager; Unit unit = stasisBomb._Unit; handle = stasisBomb._Unit.Handle; string id = handle.ToString(); double num = 400.0; Color blue = Color.Blue; particleManager.DrawRange(unit, id, (float)num, blue); } if (Core.Config._Menu.DrawingsMenu.BombsDrawings.StasisBombSubRange) { IParticleManager particleManager = Core.Config._ParticleManager; Unit unit = stasisBomb._Unit; string str1 = "st"; handle = stasisBomb._Unit.Handle; string str2 = handle.ToString(); string id = str1 + str2; double num = 600.0; Color darkCyan = Color.DarkCyan; particleManager.DrawRange(unit, id, (float)num, darkCyan); } } }
protected override void OnActivate() { UpdateManager.BeginInvoke(() => { InventoryManager = Context.Value.Inventory; Renderer = Context.Value.Renderer; ParticleManager = Context.Value.Particle; Owner = (Hero)Context.Value.Owner; Updater = new Updater(this); Log.Info("Updater loaded"); Config = new Config(this); Log.Info("Config loaded"); TextureHelper.Init(Context.Value); Log.Info("TextureHelper loaded"); /*InventoryManager.Value.Activate(); * Log.Info("InventoryManager loaded");*/ InitLocalCheats(); }, 2000); }
/// <summary> /// Cleans up. /// </summary> public virtual void CleanUp() { Camera2D.CleanUp(); foreach (var item in Objects.ToArray()) { this.RemoveObject(item); } if (CleanUpObjectsOnDispose) { foreach (var item in Objects) { item.CleanUp(graphicsFactory); } } foreach (var item in SoundEmiters2D.ToArray()) { this.RemoveSoundEmitter(item); } foreach (var item in SoundEmiters2D) { item.CleanUp(graphicsFactory); } Objects.Clear(); Camera2D = null; Dummies.Clear(); SoundEmiters2D.Clear(); particleManager = null; PhysicWorld = null; this.culler = null; }
public override void Initialize() { base.Initialize(); _defaultViewport = Graphics.Viewport; _leftViewport = _defaultViewport; _rightViewport = _defaultViewport; _leftViewport.Width = _defaultViewport.Width / 2; _rightViewport.Width = _defaultViewport.Width / 2; _rightViewport.X = _defaultViewport.Width / 2; Settings.WorldSize = Settings.ScreenSize * 2; grid = new Grid(new Rectangle(0, 0, (int)Settings.WorldSize.X, (int)Settings.WorldSize.Y), new Vector2((float)Math.Sqrt(Settings.WorldSize.X * Settings.WorldSize.Y / DefaultMaxPoints))); player1 = new Player(TextureType.Player, PlayerIndex.One); player2 = new Player(TextureType.Player, PlayerIndex.Two); camera1 = new Camera2D(_leftViewport); camera2 = new Camera2D(_rightViewport); particles = new ParticleManager(1024 * 20, ParticleState.Update); Components.Add(grid); Components.Add(player1); Components.Add(player2); Components.Add(camera1); Components.Add(camera2); Components.Add(particles); player1.Initialize(); player1.GetComponent <Kinematics>().Position = Settings.WorldSize / 2 - player1.GetComponent <Sprite>().Size; player1.GetComponent <Sprite>().Color = Color.Red; player2.Initialize(); player2.GetComponent <Kinematics>().Position = Settings.WorldSize / 2 + player2.GetComponent <Sprite>().Size; player2.GetComponent <Sprite>().Color = Color.Blue; camera1.Origin = camera1.Size / 2; camera2.Origin = camera2.Size / 2; }
public virtual void Initialize(IParticleManager particleManager, Vector3 position, Transform parent) { this.particleManager = particleManager; transform.position = position; transform.parent = parent; }
private ParticleManager() { NativeHandle = Global.gEnv.pParticleManager; }
public VisibleByEnemyPlus([Import] IServiceContext context, [Import] IParticleManager particlemanager) { Owner = context.Owner; ParticleManager = particlemanager; }
public override void Dispose() { particleManager = null; base.Dispose(); }
public override void Initialize() { particleManager = GameServiceManager.GetService <IParticleManager>(); base.Initialize(); }
public ParticleManagerPlugin(IServiceContext context) { this.owner = context.Owner; this.particleManager = context.Particle; }
public static void OnUpdate() { if (ParticleRemover.ChangedDrawingsVals["LandBombRange"] != Core.Config._Menu.DrawingsMenu.BombsDrawings.LandBombRange) { ParticleRemover.ChangedDrawingsVals["LandBombRange"] = Core.Config._Menu.DrawingsMenu.BombsDrawings.LandBombRange; ParticleRemover.ChangedDrawings["LandBombRange"] = true; } if (ParticleRemover.ChangedDrawingsVals["RemoteBombRange"] != Core.Config._Menu.DrawingsMenu.BombsDrawings.RemoteBombRange) { ParticleRemover.ChangedDrawingsVals["RemoteBombRange"] = Core.Config._Menu.DrawingsMenu.BombsDrawings.RemoteBombRange; ParticleRemover.ChangedDrawings["RemoteBombRange"] = true; } if (ParticleRemover.ChangedDrawingsVals["StasisBombRange"] != Core.Config._Menu.DrawingsMenu.BombsDrawings.StasisBombRange) { ParticleRemover.ChangedDrawingsVals["StasisBombRange"] = Core.Config._Menu.DrawingsMenu.BombsDrawings.StasisBombRange; ParticleRemover.ChangedDrawings["StasisBombRange"] = true; } if (ParticleRemover.ChangedDrawingsVals["StasisBombSubRange"] != Core.Config._Menu.DrawingsMenu.BombsDrawings.StasisBombSubRange) { ParticleRemover.ChangedDrawingsVals["StasisBombSubRange"] = Core.Config._Menu.DrawingsMenu.BombsDrawings.StasisBombSubRange; ParticleRemover.ChangedDrawings["StasisBombSubRange"] = true; } if (ParticleRemover.ChangedDrawingsVals["FrocePath"] != Core.Config._Menu.DrawingsMenu.ForceDrawings.FrocePath) { ParticleRemover.ChangedDrawingsVals["FrocePath"] = Core.Config._Menu.DrawingsMenu.ForceDrawings.FrocePath; ParticleRemover.ChangedDrawings["FrocePath"] = true; } if (ParticleRemover.ChangedDrawingsVals["FroceRange"] != Core.Config._Menu.DrawingsMenu.ForceDrawings.FroceRange) { ParticleRemover.ChangedDrawingsVals["FroceRange"] = Core.Config._Menu.DrawingsMenu.ForceDrawings.FroceRange; ParticleRemover.ChangedDrawings["FroceRange"] = true; } if (ParticleRemover.ChangedDrawings["LandBombRange"]) { if (!ParticleRemover.ChangedDrawingsVals["LandBombRange"]) { foreach (LandBomb landBomb in Core.Config._LandBombs) { IParticleManager particleManager1 = Core.Config._ParticleManager; uint handle = landBomb._Unit.Handle; string name1 = handle.ToString(); if (particleManager1.HasParticle(name1)) { IParticleManager particleManager2 = Core.Config._ParticleManager; handle = landBomb._Unit.Handle; string name2 = handle.ToString(); particleManager2.Remove(name2); } } } ParticleRemover.ChangedDrawings["LandBombRange"] = false; } if (ParticleRemover.ChangedDrawings["RemoteBombRange"]) { if (!ParticleRemover.ChangedDrawingsVals["RemoteBombRange"]) { foreach (RemoteBomb remoteBomb in Core.Config._RemoteBombs) { IParticleManager particleManager1 = Core.Config._ParticleManager; uint handle = remoteBomb._Unit.Handle; string name1 = handle.ToString(); if (particleManager1.HasParticle(name1)) { IParticleManager particleManager2 = Core.Config._ParticleManager; handle = remoteBomb._Unit.Handle; string name2 = handle.ToString(); particleManager2.Remove(name2); } } } ParticleRemover.ChangedDrawings["RemoteBombRange"] = false; } if (ParticleRemover.ChangedDrawings["StasisBombRange"]) { if (!ParticleRemover.ChangedDrawingsVals["StasisBombRange"]) { foreach (StasisBomb stasisBomb in Core.Config._StasisBombs) { IParticleManager particleManager1 = Core.Config._ParticleManager; uint handle = stasisBomb._Unit.Handle; string name1 = handle.ToString(); if (particleManager1.HasParticle(name1)) { IParticleManager particleManager2 = Core.Config._ParticleManager; handle = stasisBomb._Unit.Handle; string name2 = handle.ToString(); particleManager2.Remove(name2); } } } ParticleRemover.ChangedDrawings["StasisBombRange"] = false; } if (ParticleRemover.ChangedDrawings["StasisBombSubRange"]) { if (!ParticleRemover.ChangedDrawingsVals["StasisBombSubRange"]) { foreach (StasisBomb stasisBomb in Core.Config._StasisBombs) { IParticleManager particleManager1 = Core.Config._ParticleManager; string str1 = "st"; uint handle = stasisBomb._Unit.Handle; string str2 = handle.ToString(); string name1 = str1 + str2; if (particleManager1.HasParticle(name1)) { IParticleManager particleManager2 = Core.Config._ParticleManager; string str3 = "st"; handle = stasisBomb._Unit.Handle; string str4 = handle.ToString(); string name2 = str3 + str4; particleManager2.Remove(name2); } } } ParticleRemover.ChangedDrawings["StasisBombSubRange"] = false; } if (ParticleRemover.ChangedDrawings["FrocePath"]) { if (!ParticleRemover.ChangedDrawingsVals["FrocePath"]) { foreach (Hero hero in EntityManager <Hero> .Entities.Where <Hero>((Func <Hero, bool>)(x => { if (x.Team != Core.Config._Hero.Team) { return(!x.IsIllusion); } return(false); }))) { if (Core.Config._ParticleManager.HasParticle(hero.Name + "force")) { Core.Config._ParticleManager.Remove(hero.Name + "force"); } } } ParticleRemover.ChangedDrawings["FrocePath"] = false; } if (!ParticleRemover.ChangedDrawings["FroceRange"]) { return; } if (!ParticleRemover.ChangedDrawingsVals["FroceRange"] && Core.Config._ParticleManager.HasParticle("TR_ForceRange")) { Core.Config._ParticleManager.Remove("TR_ForceRange"); } ParticleRemover.ChangedDrawings["FroceRange"] = false; }
public override void Initialize() { particleManager = GameServiceManager.GetService<IParticleManager>(); base.Initialize(); }
public GroundMovement(IPlayer player) : base(player) { particleManager = player.getParticleManager(); }
/// <summary> /// Cleans up. /// </summary> public virtual void CleanUp() { foreach (var item in this.CameraManager.GetCamerasDescription()) { item.cam.CleanUp(); } foreach (var item in SoundEmiters3D.ToArray()) { this.RemoveSoundEmitter(item); } foreach (var item in Triggers.ToArray()) { this.RemoveTrigger(item); } foreach (var item in Lights.ToArray()) { this.RemoveLight(item); } if (CleanUpObjectsOnDispose) { foreach (var item in Objects.ToArray()) { this.RemoveObject(item); item.CleanUp(graphicFactory); } } else { foreach (var item in Objects.ToArray()) { this.RemoveObject(item); } } foreach (var item in SoundEmiters3D) { item.CleanUp(graphicFactory); } Objects.Clear(); Lights.Clear(); Dummies.Clear(); this.culler = null; SoundEmiters3D.Clear(); CameraManager = null; Triggers.Clear(); if (particleManager != null) { particleManager.iCleanUp(); particleManager = null; } this.PhysicWorld.iCleanUp(); this.PhysicWorld = null; }
/// <summary> /// Initializes a new instance of the <see cref="IWorld"/> class. /// </summary> /// <param name="PhysicWorld">The physic world.</param> /// <param name="Culler">The culler.</param> /// <param name="particleManager">The particle manager.</param> /// <param name="multiThread">if set to <c>true</c> [mult thread].</param> public IWorld(IPhysicWorld PhysicWorld, ICuller Culler, IParticleManager particleManager = null, bool multiThread = false)
public ParticleManager([Import] IServiceContext context) { _owner = context.Owner as Hero; _particleManager = context.Particle; }