public int part_two(string input) { var space = new HyperSpace(); space.AddRange(input.CharPixels().Where(p => p.Value == '#').Select(p => new Point4D(p.Key.X, p.Key.Y, 0, 0))); space.Generations(6); return(space.Count); }
private void AddHyperSpace() { HyperSpace flash = new HyperSpace(); flash.Initialize(GraphicsDevice.Viewport, _hyperSpaceIcon, new Vector2((GraphicsDevice.Viewport.Width + _hyperSpaceIcon.Width / 2), _random.Next(50, GraphicsDevice.Viewport.Height - 50))); _hyperSpace.Add(flash); }
protected override void Awake() { base.Awake(); _audioSource = GetComponents <AudioSource>(); GetAnimators(); _hyperSpace = GetComponent <HyperSpace>(); _energyFuel = GetComponent <EnergyFuel>(); }
public static void ToHyper(Ship ship) { ship.location.elocation = ELocation.hyper; ship.state = EShipState.inHyper; if (!Galaxy.StarSystemsArr[ship.location.indexStarSystem].shipsList.Remove(ship)) { throw new Exception(); } HyperSpace.AddToHyperSpace(ship); }
IEnumerator SetHyperSpace() { yield return(new WaitForSeconds(2)); if (FindObjectOfType <HyperSpace>()) { HyperSpace hyperSpace = FindObjectOfType <HyperSpace>(); hyperSpace.SetHyperSpace(); hyperSpace.PlayHyperSpaceSound(); } }
private static void Tasks() { AI.AIManager.Tick(); HyperSpace.Tick(); }