void Awake() { Instance = this; foreach (Camera c in Object.FindObjectsOfType(typeof(Camera))) { if (c.tag.ToLower().Contains("player")) { PlayerCamera = c; } if (c.tag.ToLower().Contains("scenario")) { ScenarioCamera = c; } } foreach (AudioListener listener in Object.FindObjectsOfType(typeof(AudioListener))) { if (listener.tag.ToLower().Contains("player")) { PlayerAudioListener = listener; } if (listener.tag.ToLower().Contains("scenario")) { ScenarioAudioListener = listener; } } foreach (ObjectDock dockMono in FindObjectsOfType(typeof(ObjectDock))) { ObjectDockMonoDict.Add(dockMono.Name, dockMono); } }
void Awake() { Debug.Log(Application.persistentDataPath); if (SaveSystem.LoadPlayer() != null) { Load(); } else { CreateSaveFile(); } if (gameControl == null) { DontDestroyOnLoad(gameObject); gameControl = this; } else if (gameControl != this) { Destroy(gameObject); } scenarioControl = FindObjectOfType <ScenarioControl>(); }
protected override void OnNavigatedTo(NavigationEventArgs e) { // Populate the scenario list from the SampleConfiguration.cs file if (Windows.Foundation.Metadata.ApiInformation.IsTypePresent("Windows.Phone.UI.Input.HardwareButtons")) { ScenarioControl.ItemsSource = mobilescenarios; } else { ScenarioControl.ItemsSource = desktopscenarios; } // If we have saved state return to the previously selected scenario if (SuspensionManager.SessionState.ContainsKey("SelectedScenarioIndex") && String.IsNullOrEmpty(e.Parameter.ToString())) { ScenarioControl.SelectedIndex = Convert.ToInt32(SuspensionManager.SessionState["SelectedScenarioIndex"]); ScenarioControl.ScrollIntoView(ScenarioControl.SelectedItem); } else if (!String.IsNullOrEmpty(e.Parameter.ToString())) { this.LaunchParam = e.Parameter.ToString(); int index = 0; this.GetScenarioIdForLaunch(this.LaunchParam, ref index); ScenarioControl.SelectedIndex = index; } else { ScenarioControl.SelectedIndex = 0; } }
// Use this for initialization void Start() { if (PlayOnAwake) { StartCoroutine("StartDocking", objectToDock); } //register this object dock at start. ScenarioControl.RegisterObjectDock(this); }
void Awake() { _instance = this; player = GameObject.FindGameObjectWithTag(PlayerTag); gameDialogueObject = FindObjectOfType(typeof(GameDialogue)) as GameDialogue; scenarioControlObject = FindObjectOfType(typeof(ScenarioControl)) as ScenarioControl; backGroundMusicPlayer = FindObjectOfType(typeof(BackgroundMusicPlayer)) as BackgroundMusicPlayer; checkPointManager = FindObjectOfType(typeof(CheckPointManager)) as CheckPointManager; playerRuntimeCameraConfig = FindObjectOfType(typeof(PlayerCameraRuntimeConfig)) as PlayerCameraRuntimeConfig; }
protected override void OnNavigatedTo(NavigationEventArgs e) { // Populate the scenario list from the SampleConfiguration.cs file ScenarioControl.ItemsSource = scenarios; // If we have saved state return to the previously selected scenario if (SuspensionManager.SessionState.ContainsKey("SelectedScenarioIndex")) { ScenarioControl.SelectedIndex = Convert.ToInt32(SuspensionManager.SessionState["SelectedScenarioIndex"]); ScenarioControl.ScrollIntoView(ScenarioControl.SelectedItem); } else { ScenarioControl.SelectedIndex = 0; } }
private void GetScenariosUnlocked() { scenarioControl = FindObjectOfType <ScenarioControl>(); /*if (SaveSystem.LoadPlayer().scenariosUnlocked != null || SaveSystem.LoadPlayer().scenariosUnlocked.Length != ScenarioControl.scenarioControlInstance.scenarios.Length) * scenariosUnlocked = SaveSystem.LoadPlayer().scenariosUnlocked; * else * scenariosUnlocked = new bool[] { true, false, false, false };*/ if (SaveSystem.LoadPlayer().scenariosUnlocked == null) { scenariosUnlocked = new bool[] { false, false, false } } ; else { scenariosUnlocked = SaveSystem.LoadPlayer().scenariosUnlocked; } }
protected override void OnNavigatedTo(NavigationEventArgs e) { // Populate the scenario list from the SampleConfiguration.cs file ScenarioControl.ItemsSource = scenarios; // If we have saved state return to the previously selected scenario if (SuspensionManager.SessionState.ContainsKey("SelectedScenarioIndex") && String.IsNullOrEmpty(e.Parameter.ToString())) { ScenarioControl.SelectedIndex = Convert.ToInt32(SuspensionManager.SessionState["SelectedScenarioIndex"]); ScenarioControl.ScrollIntoView(ScenarioControl.SelectedItem); } else if (e.Parameter != null && !String.IsNullOrEmpty(e.Parameter.ToString())) { this.LaunchParam = e.Parameter.ToString(); int index = 0; this.GetScenarioIdForLaunch(this.LaunchParam, ref index); ScenarioControl.SelectedIndex = index; } }
protected override async void OnNavigatedTo(NavigationEventArgs e) { Common.APIClient.rootPage = MainPage.Current; try { IEnumerable <int> Autorizados = await Models.UsuariosModel.GetVinculos(); // Populate the scenario list from the SampleConfiguration.cs file ScenarioControl.ItemsSource = from a in scenarios join b in Autorizados on a.Number equals b select a; foreach (var item in Autorizados) { if (item == 23) { ConfLink.Visibility = Visibility; } } // If we have saved state return to the previously selected scenario if (SuspensionManager.SessionState.ContainsKey("SelectedScenarioIndex") && String.IsNullOrEmpty(e.Parameter.ToString())) { ScenarioControl.SelectedIndex = Convert.ToInt32(SuspensionManager.SessionState["SelectedScenarioIndex"]); ScenarioControl.ScrollIntoView(ScenarioControl.SelectedItem); } else if (e.Parameter != null && !String.IsNullOrEmpty(e.Parameter.ToString())) { this.LaunchParam = e.Parameter.ToString(); int index = 0; this.GetScenarioIdForLaunch(this.LaunchParam, ref index); ScenarioControl.SelectedIndex = index; } } catch (Exception) { // No hay menu NotifyUser("Usted no tiene autorizacion para usar esta aplicacion.", NotifyType.ErrorMessage); } }
public MapEditor(MainWindow mainWindow) { InitializeComponent(); this.mainWindow = mainWindow; Scenario = new ScenarioControl(); mapdata = new MapData(this); taskManager = new TaskManager(this); shortCutManager = new ShortCutManager(this); ScenarioPanel.Child = Scenario; minimapcolor = new Microsoft.Xna.Framework.Color[256 * 256]; miniampUnit = new Microsoft.Xna.Framework.Color[256 * 256]; TileBack = Microsoft.Xna.Framework.Color.Black; DoodadOverlay = new Microsoft.Xna.Framework.Color(255, 0, 0, 255); SpriteOverlay = new Microsoft.Xna.Framework.Color(0, 255, 0, 255); if (Global.Setting.Vals[Global.Setting.Settings.Program_GRPLoad] == "false") { TilePalleteBtn.IsEnabled = false; DoodadPalleteBtn.IsEnabled = false; UnitPalleteBtn.IsEnabled = false; SpritePalleteBtn.IsEnabled = false; TabChange(Layer.Location); } else { TabChange(Layer.Tile); } }
protected override void OnNavigatedTo(NavigationEventArgs e) { String launchArgs = e.Parameter as String; if (launchArgs != null && launchArgs.Contains("Windows.Networking.Proximity.PeerFinder:StreamSocket")) { _isLaunchedByTap = true; if (launchArgs.Contains("Role=Host")) { _appRole = PeerRole.Host; } else if (launchArgs.Contains("Role=Client")) { _appRole = PeerRole.Client; } else { _appRole = PeerRole.Peer; } } // Populate the scenario list from the SampleConfiguration.cs file ScenarioControl.ItemsSource = scenarios; // If we have saved state return to the previously selected scenario if (SuspensionManager.SessionState.ContainsKey("SelectedScenarioIndex")) { ScenarioControl.SelectedIndex = Convert.ToInt32(SuspensionManager.SessionState["SelectedScenarioIndex"]); ScenarioControl.ScrollIntoView(ScenarioControl.SelectedItem); } else { ScenarioControl.SelectedIndex = 0; } }
public void Awake() { scenarioControlInstance = this; }
public void NavigateToProtocolPage() { ScenarioControl.SelectedIndex = 3; ScenarioControl.ScrollIntoView(ScenarioControl.SelectedItem); }
public void NavigateToFilePage() { ScenarioControl.SelectedIndex = 2; ScenarioControl.ScrollIntoView(ScenarioControl.SelectedItem); }
void OnDestroy() { Instance = null; }
void Awake() { Instance = this; foreach(Camera c in Object.FindObjectsOfType(typeof(Camera))) { if(c.tag.ToLower().Contains("player")) { PlayerCamera = c; } if(c.tag.ToLower().Contains("scenario")) { ScenarioCamera = c; } } foreach(AudioListener listener in Object.FindObjectsOfType(typeof(AudioListener))) { if(listener.tag.ToLower().Contains("player")) { PlayerAudioListener = listener; } if(listener.tag.ToLower().Contains("scenario")) { ScenarioAudioListener = listener; } } foreach(ObjectDock dockMono in FindObjectsOfType(typeof(ObjectDock))) { ObjectDockMonoDict.Add(dockMono.Name, dockMono); } }
public FindForm(ScenarioControl sc) : this() { this.sc = sc; }