void Start() { games = GamesLoader.current; int nrOfGames = games.GetNumberOfGames() - 1; maxRight = (buttonSpacing + buttonWidth) * nrOfGames; rect = GetComponent <RectTransform>(); targetPosition = currentPosition; rect.anchoredPosition = new Vector2(currentPosition, 0f); }
public void OnSelect(BaseEventData eventData) { games = GamesLoader.current; rect = GetComponent <RectTransform>(); rect.localScale += new Vector3(0.5f, 0.5f, 0); if (games.getGameIsRunning() == true) { games.setGameIsRunning(false); games.reload(); } }
void Awake() { startLED(); Cursor.visible = false; Screen.SetResolution(Screen.resolutions[Screen.resolutions.Length - 1].width, Screen.resolutions[Screen.resolutions.Length - 1].height + 150, false); driveInserted = Directory.Exists(usbPath); InvokeRepeating("LookForUSBDrive", 0f, 5f); current = this; _path = Directory.GetCurrentDirectory() + "\\" + rootFolderName; startLEDIdle(); }
public MainWindow() { InitializeComponent(); var games = new GamesLoader().Load().ToList(); var pokemonSpecies = new SpeciesLoader().Load(); var natures = new NaturesLoader().Load(); var items = Enum.GetValues(typeof(Items)); DataContext = new Context(new List<Pokemon> { Pokemon.MissingNo, Pokemon.MissingNo }, games, pokemonSpecies, natures, items.OfType<Items>()); }