public override void Start(IGameplayContainer container) { Enabled = true; container.GameAct += ClearTouch; container.GameReact += Update; container.Draw += Instance_GameRender; }
public override void Stop(IGameplayContainer container) { foreach (string sound in sounds) { Engine.Instance.SoundSystem.StopSfxIfLooping(sound); } }
public override void Stop(IGameplayContainer container) { container.GameAct -= ClearTouch; container.GameReact -= Update; container.Draw -= Instance_GameRender; Enabled = false; ClearTouch(); enabledBoxes.Clear(); }
public override void Stop(IGameplayContainer container) { container.GameThink -= Update; container.GameCleanup -= Instance_GameCleanup; if (meter != null) { meter.Stop(); } Hit = false; flashing = 0; }
public override void Start(IGameplayContainer container) { container.GameThink += Update; container.GameCleanup += Instance_GameCleanup; Health = StartHealth; if (meter != null) { meter.Start(container); } }
public BlocksPattern(BlockPatternInfo info, IGameplayContainer container, IEntityPool entityPool) { this.info = info; length = info.Length; leftBoundary = info.LeftBoundary; rightBoundary = info.RightBoundary; blocks = new List <BlockInfo>(); running = false; frame = 0; this.container = container; this._entityPool = entityPool; }
public BlocksPattern(BlockPatternInfo info, IGameplayContainer container, IEntityPool entityPool) { this.info = info; length = info.Length; leftBoundary = info.LeftBoundary; rightBoundary = info.RightBoundary; blocks = new List<BlockInfo>(); running = false; frame = 0; this.container = container; this._entityPool = entityPool; }
public override void Start(IGameplayContainer container) { currentState = "Start"; stateChanged = false; StateFrames = 0; Lifetime = 0; container.GameThink += Update; if (states.ContainsKey(currentState)) { states[currentState].Initialize(Parent); } }
public ScreenHandler(ScreenInfo screen, IEnumerable <ScreenLayer> layers, IEnumerable <JoinHandler> joins, IEnumerable <BlocksPattern> blockPatterns, IGameplayContainer container) { Screen = screen; patterns = new List <BlocksPattern>(); this.layers = layers; this.patterns = blockPatterns.ToList(); this.joins = joins; teleportEnabled = new List <bool>(screen.Teleports.Select(info => false)); this.container = container; }
public void Start(IGameplayContainer container) { if (container == null) { throw new ArgumentNullException("container"); } this.container = container; if (this.binding != null) { this.binding.Start(container.Entities); } container.Draw += GameRender; running = true; }
public void Start(IGameplayContainer container) { this.container = container; foreach (Component c in Components) { c.Start(container); } if (Started != null) { Started(); } Running = true; }
public ScreenHandler(ScreenInfo screen, IEnumerable<ScreenLayer> layers, IEnumerable<JoinHandler> joins, IEnumerable<BlocksPattern> blockPatterns, IGameplayContainer container) { Screen = screen; patterns = new List<BlocksPattern>(); spawnedEntities = new List<GameEntity>(); this.layers = layers; this.patterns = blockPatterns.ToList(); this.joins = joins; teleportEnabled = new List<bool>(screen.Teleports.Select(info => false)); this.container = container; }
public override void Start(IGameplayContainer container) { if (Direction == Direction.Unknown) { Direction = Direction.Right; } container.GameAct += Update; pushX = pushY = 0; dragX = dragY = resistX = resistY = 1; if (Parent.Screen != null && position != null) { overTile = Parent.Screen.TileAt(position.Position.X, position.Position.Y); } }
public BossDoorHandler(Join join, IGameplayContainer container, IEntityPool entityPool, int tileSize, int height, int width, string name) : base(join, tileSize, height, width, name) { this.container = container; _entityPool = entityPool; if (direction == Direction.Down) { doorOneX = join.offsetOne * tileSize; doorOneY = height - tileSize; doorTwoX = join.offsetOne * tileSize; doorTwoY = height; } else if (direction == Direction.Left) { doorOneX = 0; doorOneY = join.offsetTwo * tileSize; doorTwoX = -tileSize; doorTwoY = join.offsetTwo * tileSize; } else if (direction == Direction.Right) { doorOneX = width - tileSize; doorOneY = join.offsetOne * tileSize; doorTwoX = width; doorTwoY = join.offsetOne * tileSize; } else if (direction == Direction.Up) { doorOneX = join.offsetTwo * tileSize; doorOneY = 0; doorTwoX = join.offsetTwo * tileSize; doorTwoY = -tileSize; } }
public override void Stop(IGameplayContainer container) { container.GameAct -= Update; }
public override void Stop(IGameplayContainer container) { Reset(); container.GameThink -= Update; Engine.Instance.GameInputReceived -= Instance_GameInputReceived; }
public override void Start(IGameplayContainer container) { container.GameCleanup += Update; }
public override void Start(IGameplayContainer container) { Reset(); container.GameThink += Update; Engine.Instance.GameInputReceived += Instance_GameInputReceived; }
public HandlerMeter(HealthMeter meter, IGameplayContainer container) { this.Meter = meter; this.container = container; }
public override void Stop(IGameplayContainer container) { _vars.Clear(); }
public override void Stop(IGameplayContainer container) { StateFrames = 0; Lifetime = 0; container.GameThink -= Update; }
public void Push(IGameplayContainer handler) { _handlerStack.Push(handler); }
public override void Start(IGameplayContainer container) { Reset(); container.GameCleanup += Update; Engine.Instance.GameInputReceived += Instance_GameInputReceived; }
public abstract void Stop(IGameplayContainer container);
public override void Start(IGameplayContainer container) { currentState = "Start"; stateChanged = false; StateFrames = 0; Lifetime = 0; container.GameThink += Update; if (states.ContainsKey(currentState)) states[currentState].Initialize(Parent); }
public override void Start(IGameplayContainer container) { container.GameThink += Update; }
public override void Stop(IGameplayContainer container) { Reset(); container.GameCleanup -= Update; Engine.Instance.GameInputReceived -= Instance_GameInputReceived; }
public override void Start(IGameplayContainer container) { }
public override void Start(IGameplayContainer container) { container.GameThink += Update; container.Draw += Instance_GameRender; }
public override void Start(IGameplayContainer container) { Timers.Clear(); container.GameThink += Update; }
public override void Stop(IGameplayContainer container) { Timers.Clear(); container.GameThink -= Update; }
public override void Stop(IGameplayContainer container) { foreach (string sound in sounds) Engine.Instance.SoundSystem.StopSfxIfLooping(sound); }
public override void Stop(IGameplayContainer container) { container.GameThink -= Update; container.Draw -= Instance_GameRender; }
public override void Stop(IGameplayContainer container) { timers.Clear(); container.GameThink -= Update; }
public override void Start(IGameplayContainer container) { timers.Clear(); container.GameThink += Update; }