public void MoveToLocation(MapLocation newLocation) { // Remove focus on last location _lastLocation.ToggleFocus(); _lastLocation = newLocation; // Focus on newlocation _lastLocation.ToggleFocus(); // TODO : Save progression // Variables to save : // Seed (procgen map) // Id of the last position (the algorithm should always give the id the same way to ensure that the same ID on the same seed always refer to the same place) PlayerPrefs.SetInt("last_location", newLocation.id); PlayerPrefs.Save(); _lastLocation.LaunchEvent(); }
public void SetLocation() { EventSystem.current.SetSelectedGameObject(_lastLocation.gameObject); _lastLocation.ToggleFocus(); }