public Shotgun(ZombieGame game, Vector2 initPos) : base(game, initPos, NAME, DAMAGE, 96, 96, 12, FIRE_RATE, BULLET_SPEED, false, RELOAD_TIME) { Emitters.Add(new ParticleEmitter(game, 50, false, FIRE_RATE, new Vector2(Sprite.Position.X - EMITTERS_OFFSET, Sprite.Position.Y))); Emitters.Add(new ParticleEmitter(game, 50, false, FIRE_RATE, new Vector2(Sprite.Position.X + EMITTERS_OFFSET, Sprite.Position.Y))); ShotgunPump = game.SfxMgr.Find("ShotgunPump"); }
public RobustXamlILCompiler(TransformerConfiguration configuration, XamlLanguageEmitMappings <IXamlILEmitter, XamlILNodeEmitResult> emitMappings, bool fillWithDefaults) : base(configuration, emitMappings, fillWithDefaults) { Transformers.Add(new AddNameScopeRegistration()); Transformers.Add(new RobustMarkRootObjectScopeNode()); Emitters.Add(new AddNameScopeRegistration.Emitter()); Emitters.Add(new RobustMarkRootObjectScopeNode.Emitter()); }
public WinUIXamlILCompiler(TransformerConfiguration configuration, XamlLanguageEmitMappings <IXamlILEmitter, XamlILNodeEmitResult> emitMappings) : base(configuration, emitMappings, true) { this.AddWinUIPhases(); Emitters.Add(new XamlDirectConversionEmitter()); Emitters.Add(new XamlDirectNewObjectEmitter()); Emitters.Add(new XamlDirectSetterEmitter()); Emitters.Add(new XamlDirectAdderSetterEmitter()); Emitters.Add(new XamlDirectEventSetterEmitter()); }
private AvaloniaXamlIlCompiler(TransformerConfiguration configuration, XamlLanguageEmitMappings <IXamlILEmitter, XamlILNodeEmitResult> emitMappings) : base(configuration, emitMappings, true) { _configuration = configuration; void InsertAfter <T>(params IXamlAstTransformer[] t) => Transformers.InsertRange(Transformers.FindIndex(x => x is T) + 1, t); void InsertBefore <T>(params IXamlAstTransformer[] t) => Transformers.InsertRange(Transformers.FindIndex(x => x is T), t); // Before everything else Transformers.Insert(0, new XNameTransformer()); Transformers.Insert(1, new IgnoredDirectivesTransformer()); Transformers.Insert(2, _designTransformer = new AvaloniaXamlIlDesignPropertiesTransformer()); Transformers.Insert(3, _bindingTransformer = new AvaloniaBindingExtensionTransformer()); // Targeted InsertBefore <PropertyReferenceResolver>( new AvaloniaXamlIlResolveClassesPropertiesTransformer(), new AvaloniaXamlIlTransformInstanceAttachedProperties(), new AvaloniaXamlIlTransformSyntheticCompiledBindingMembers()); InsertAfter <PropertyReferenceResolver>( new AvaloniaXamlIlAvaloniaPropertyResolver(), new AvaloniaXamlIlReorderClassesPropertiesTransformer() ); InsertBefore <ContentConvertTransformer>( new AvaloniaXamlIlBindingPathParser(), new AvaloniaXamlIlSelectorTransformer(), new AvaloniaXamlIlControlTemplateTargetTypeMetadataTransformer(), new AvaloniaXamlIlPropertyPathTransformer(), new AvaloniaXamlIlSetterTransformer(), new AvaloniaXamlIlConstructorServiceProviderTransformer(), new AvaloniaXamlIlTransitionsTypeMetadataTransformer(), new AvaloniaXamlIlResolveByNameMarkupExtensionReplacer() ); // After everything else InsertBefore <NewObjectTransformer>( new AddNameScopeRegistration(), new AvaloniaXamlIlDataContextTypeTransformer(), new AvaloniaXamlIlBindingPathTransformer(), new AvaloniaXamlIlCompiledBindingsMetadataRemover() ); Transformers.Add(new AvaloniaXamlIlMetadataRemover()); Transformers.Add(new AvaloniaXamlIlRootObjectScope()); Emitters.Add(new AvaloniaNameScopeRegistrationXamlIlNodeEmitter()); Emitters.Add(new AvaloniaXamlIlRootObjectScope.Emitter()); }
public static int RegisterEmitter(SignalEmitter emitter) { var newId = 0; if (Emitters.Count > 0) { newId = Emitters.Max(e => e.Id) + 1; } emitter.Id = newId; Emitters.Add(emitter); return(emitter.Id); }
public virtual void ReadChildData(BinaryReader reader) { int x = 0; _particle.ReadString(reader); for (x = 0; (x < _emitters.Count); x = (x + 1)) { Emitters.Add(new ParticleSystemEmitterDefinitionBlockBlock()); Emitters[x].Read(reader); } for (x = 0; (x < _emitters.Count); x = (x + 1)) { Emitters[x].ReadChildData(reader); } }
internal static ParticleEmitter TryGet(IntPtr handle) { #if !(RELEASE && RELEASE_DISABLE_CHECKS) if (handle == IntPtr.Zero) { throw new NullPointerException(); } #endif var particleEmitter = Emitters.FirstOrDefault(x => x.Handle == handle); if (particleEmitter == null) { particleEmitter = new ParticleEmitter(handle); Emitters.Add(particleEmitter); } return(particleEmitter); }
public SMG(ZombieGame game, Vector2 initPos) : base(game, initPos, NAME, DAMAGE, 1000, 320, 32, FIRE_RATE, BULLET_SPEED, false, RELOAD_TIME) { Emitters.Add(new ParticleEmitter(game, 50, false, FIRE_RATE, Sprite.Position)); }
public void Awake() { Emitters.Add(this); Source.spatialBlend = 0.0f; }