public ShadowPlayer SpawnPlayBackPlayer(GameObject prefab, LocationMark location, ControlDetail[] controlSequence) { var player = Instantiate(prefab).GetComponent <ShadowPlayer>(); player.GetComponent <PlayerController>().ControlSequence = new PlaybackControlSequence(controlSequence); player.transform.position = location.transform.position; PlayBackPlayers.Add(player); return(player); }
public Player SpawnPlayer(GameObject prefab, LocationMark location) { var player = Instantiate(prefab).GetComponent <Player>(); player.GetComponent <PlayerController>().ControlSequence = new InputControlSequence(); player.transform.position = location.transform.position; PlayerInControl = player; GameObject.FindGameObjectWithTag("MainCamera").GetComponent <CameraMovement>().followTarget = player.transform; return(player); }
public bool RemoveMark(LocationMark location) { foreach (var f in Items) { if (f.MapModel.RemoveMark(location)) { return(true); } } return(false); }
public void RemoveMark(LocationMark location) { MapModel.Marks.Remove(MapModel.Marks.Where((m) => m.DetectionResults.scoringId == location.DetectionResults.scoringId).First()); if (MapModel.Marks.Any()) { MapModel.Shading = MapPolygonExtensions.RED_AREA_SHADING; MapModel.Stroke = MapPolygonExtensions.RED_AREA_STROKE; } else { MapModel.Shading = MapPolygonExtensions.GREEN_AREA_SHADING; MapModel.Stroke = MapPolygonExtensions.GREEN_AREA_STROKE; } }
} // GetLocations() public static void LoadLocations() { LocationMark location = new LocationMark { Name = "Świątynia", Width = 0.15, Height = 0.77, Discovered = true, Destination = 0 }; Locations.Add(location); location = new LocationMark { Name = "Troja", Width = 0.22, Height = 0.15, Discovered = true, Destination = 0 }; Locations.Add(location); location = new LocationMark { Name = "Teby", Width = 0.48, Height = 0.83, Discovered = true, Destination = 0 }; Locations.Add(location); location = new LocationMark { Name = "Posterunek", Width = 0.63, Height = 0.625, Discovered = true, Destination = 0 }; Locations.Add(location); location = new LocationMark { Name = "Bandyci", Width = 0.60, Height = 0.97, Discovered = true, Destination = 0 }; Locations.Add(location); location = new LocationMark { Name = "Wyrocznia", Width = 0.63, Height = 0.55, Discovered = true, Destination = 0 }; Locations.Add(location); location = new LocationMark { Name = "Biblioteka", Width = 0.42, Height = 0.42, Discovered = true, Destination = 0 }; Locations.Add(location); location = new LocationMark { Name = "Krypta", Width = 0.85, Height = 0.50, Discovered = true, Destination = 0 }; Locations.Add(location); location = new LocationMark { Name = "Katedra", Width = 0.85, Height = 0.12, Discovered = true, Destination = 0 }; Locations.Add(location); } // LoadLocations()