// Start is called before the first frame update void Start() { GameObject canvas = GameObject.Find("Canvas"); //next_scene = !start; if (next_scene) { load = canvas.transform.Find("RawImage").GetComponent <load_scene>(); } timer = canvas.GetComponent <TimeManagement>(); cg_bgm = canvas.GetComponent <AudioSource>(); bgm = GameObject.Find("Background").GetComponent <AudioSource>(); //cg_bgm.Pause(); if (start) { timer.pause = true; } cg_toshow = 0; cg_num = transform.childCount; cgs = new Transform[cg_num]; for (int i = 0; i < cg_num; i++) { cgs[i] = transform.GetChild(i); cgs[i].localScale = disable; } }
public MainWindow() { InitializeComponent(); Thread.Sleep(5000); Process[] procs = Process.GetProcesses(); var s = new List <string>(); foreach (Process p in procs) { if (!String.IsNullOrWhiteSpace(p.MainWindowTitle)) { s.Add(p.MainWindowTitle); } } using (var textReader = new StreamReader("tm.xml")) { var deserializer = new XmlSerializer(typeof(TimeManagement)); TimeManagement = (TimeManagement)deserializer.Deserialize(textReader); } var bindProjectsListBox = new Binding { Source = TimeManagement, Path = new PropertyPath("Projects"), Mode = BindingMode.TwoWay }; ProjectListBox.SetBinding(ItemsControl.ItemsSourceProperty, bindProjectsListBox); _worker.DoWork += worker_DoWork; _worker.RunWorkerAsync(); }
//method untuk menampilkan ui gamewin public void ShowGameWin() { if (GameWin.IsWin) { TimeManagement.TimeInActive(); } panelWin.SetActive(GameWin.IsWin); }
void Update() { flag = TimeManagement.getFlag(); if (flag == 10) { p.gameObject.SetActive(true); } }
//method untuk menampilkan ui gameover public void ShowGameOver() { if (GameOver.IsGameOver) { TimeManagement.TimeInActive(); } panelGameOver.SetActive(GameOver.IsGameOver); }
public IActionResult GenarateDisponibilities([FromBody] M.PlanningProfessional planning) { var dates = TimeManagement.planningDates(planning.startDate, planning.endDate, planning.saturday, planning.sunday); var disponibilities = TimeManagement.plannningHours(dates, planning.professionalId, planning.startHour, planning.endHour); return(new ObjectResult(_repository.Disponibility.CreateMany(disponibilities))); }
void timeUnit(string s) { TimeManagement tpanel = speedController.GetComponent <TimeManagement> (); string [] split = s.Split(' '); int t = int.Parse(split [0]); tpanel.setTime(t); msgBox.ServerMessage("Server time unit: " + s, Color.green); }
//method untuk handle input name player public void EnterButtonClicked() { btn.onClick.AddListener(() => { TimeManagement.Instance.timer = 300; TimeManagement.TimeActive(); TimeManagement.Instance.SetTimer(); Board.Instance.RandomMap(); Data.Name = inputName.text; HiddenUI(); }); }
//Method yang dijalankan sekali di awal scene private void Start() { //set data player Data.Health = 3; Data.Score = 0; Data.Name = ""; //instantiate object food Factory.Instance.Create(); TimeManagement.TimeInActive(); Database.Get(); }
void Awake() { if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } //DontDestroyOnLoad(gameObject); }
public override void Load() { FillMagnesisList(); StasisableProjectiles.Load(); TimeManagement.Load(); NoteLoader.Load(); if (!Main.dedServ) { TLoZInput.Load(Instance); TLoZTextures.Load(); UIManager.Load(); TLoZDialogues.Load(); } }
public override void Unload() { MagnesisRune.magnesisWhiteList.Clear(); RuneManager.Instance.Unload(); TimeManagement.Unload(); StasisableProjectiles.Unload(); TLoZInput.Unload(); TLoZTextures.Unload(); TLoZDialogues.Unload(); MagnesisRune.magnesisWhiteList = null; Instance = null; loZClientConfig = null; }
void Update() { if (GlobalVar.isInteracting == false) { // Find if Escape has been pressed bool pressed = Input.GetKeyDown(KeyCode.Escape); bool click = Input.GetMouseButtonDown(1); // If esc has been pressed... if (pressed) { // If the menu is already up close it and it's sub panels if (panel.gameObject.active) { panel.SetActive(false); InventoryMenu.activateInven = false; RelationshipMenu.activateRship = false; OptionsMenu.activateOptions = false; GlobalVar.isPaused = false; } else // Otherwise show the menu { panel.SetActive(true); GlobalVar.isPaused = true; } } // Close the menu if left click has been pressed and menu is active if (click && panel.active == true) { panel.SetActive(false); InventoryMenu.activateInven = false; RelationshipMenu.activateRship = false; OptionsMenu.activateOptions = false; GlobalVar.isPaused = false; } // Change the text of the time here timeText.text = "Month : " + GlobalVar.month + "\n" + "Day : " + GlobalVar.day + ", " + TimeManagement.getDay() + "\n" + "Time : " + GlobalVar.hour.ToString("00") + ":" + Mathf.Round(GlobalVar.minute).ToString("00"); } }
public object Convert(object value, Type targetType, object parameter, CultureInfo culture) { var valueDateTime = TimeManagement.UnixTimestampToDateTime((int)value); // If it is today, only output the time if (valueDateTime.Date == TimeManagement.UnixTimestampToDateTime(TimeManagement.UnixTimestampNow).Date) { return(valueDateTime.ToLocalTime().ToString("t", culture)); } // If it is yesterday, do not output full day date if (TimeManagement.UnixTimestampToDateTime(TimeManagement.UnixTimestampNow) - valueDateTime == TimeSpan.FromDays(1)) { return(AppResources.Yesterday + " " + valueDateTime.ToLocalTime().ToString("t", culture)); } return(valueDateTime.ToLocalTime().ToString("g", culture)); }
private void Awake() { deadlineCalendar = new List <List <Deadline> >(36); for (int i = 0; i < 36; i++) { deadlineCalendar.Add(new List <Deadline>()); } if (instance == null) { instance = this; } else if (instance != this) { Destroy(gameObject); } dayText = GameObject.FindWithTag("day").transform.GetChild(0).GetComponent <Text>(); dayText.enabled = false; for (int i = 0; i < 36; i++) { deadlineCalendar.Add(new List <Deadline>()); } }
public PageResult OnGet(String?search) { Resturaunts = _context.Resturaunt.Include(m => m.ResturauntPage).ThenInclude(n => n.Days).ToList(); Locations = _context.Location.ToList(); foreach (var r in Resturaunts) { foreach (var d in r.ResturauntPage.Days) { _context.Entry(d) .Collection(s => s.Deals) .Load(); foreach (var t in d.Deals) { _context.Entry(t) .Collection(s => s.TagsInter) .Load(); foreach (var j in t.TagsInter) { _context.Entry(j) .Reference(n => n.Tag) .Load(); } } } } if (search != null) { SearchLine = search.ToLower(); Ranking = new Dictionary <int, int>(); char[] delimiterChars = { ' ', ',', '.', ':', '\t', '\0' }; string[] words = SearchLine.Split(delimiterChars); foreach (var r in Resturaunts) { int rank = 0; foreach (var d in r.ResturauntPage.Days[TimeManagement.GetDay()].Deals) { foreach (var t in d.TagsInter) { if (GetContains(t.Tag.TagName.ToLower(), words)) { rank++; } } if (d.Desription != null) { if (GetContains(d.Desription.ToLower(), words)) { rank++; } } if (d.ItemName != null) { if (GetContains(d.ItemName.ToLower(), words)) { rank++; } } } if (words.Contains(r.Name.ToLower())) { rank++; } Ranking.Add(r.id, rank); } Ranking.OrderByDescending(n => n.Value); } return(Page()); }
private void btnCalculate_Click(object sender, EventArgs e) { //declaring variables string workshop, city; decimal workshopCost, lodgingCost, totalCost; int days; //declare constants for workshop prices & lodging base pricing const decimal HandlingStress = 1000, TimeManagement = 800, SupervisionSkills = 1500, Negotiation = 1300, HowToInterview = 500, AustinLodging = 150, ChicagoLodging = 225, DallasLodging = 175, OrlandoLodging = 300, PhoenixLodging = 175, RaleighLodging = 150; if (lstWorkshop.SelectedIndex != -1) { workshop = lstWorkshop.SelectedItem.ToString(); //setup price for each workshop switch (workshop) { case "Handling Stress": txtRegistrationCost.Text = HandlingStress.ToString("c"); workshopCost = 1000m; days = 3; break; case "Time Management": txtRegistrationCost.Text = TimeManagement.ToString("c"); workshopCost = 800m; days = 3; break; case "Supervision Skills": txtRegistrationCost.Text = SupervisionSkills.ToString("c"); workshopCost = 1500m; days = 3; break; case "Negotiation": txtRegistrationCost.Text = Negotiation.ToString("c"); workshopCost = 1300; days = 5; break; case "How to Interview": txtRegistrationCost.Text = HowToInterview.ToString("c"); workshopCost = 500m; days = 1; break; } } else { //No Workshop Selected :( MessageBox.Show("Select a Workshop!"); } if (lstLocation.SelectedIndex != -1) { city = lstLocation.SelectedItem.ToString(); //setup price for each city switch (city) { case "Austin": txtLodgingCost.Text = AustinLodging.ToString("c"); lodgingCost = 150; break; case "Chicago": txtLodgingCost.Text = ChicagoLodging.ToString("c"); lodgingCost = 225; break; case "Dallas": txtLodgingCost.Text = DallasLodging.ToString("c"); lodgingCost = 175; break; case "Orlando": txtLodgingCost.Text = OrlandoLodging.ToString("c"); lodgingCost = 300; break; case "Phoenix": txtLodgingCost.Text = PhoenixLodging.ToString("c"); lodgingCost = 175; break; case "Raleigh": txtLodgingCost.Text = RaleighLodging.ToString("c"); lodgingCost = 150; break; } } else { //No City Selected :( MessageBox.Show("Select a City!"); } { //calculate totals if (decimal.TryParse(txtRegistrationCost.Text, out workshopCost)) { if (decimal.TryParse(txtLodgingCost.Text, out lodgingCost)) { totalCost = lodgingCost + workshopCost; txtTotalCost.Text = totalCost.ToString("c"); } else { } } else { } } }
public void Exit() { TimeManagement.TimeActive(); SceneManager.LoadScene("MainMenu"); }
//method untuk melakukan restart dan dipanggil ketika button restart di click public void Restart() { TimeManagement.TimeActive(); SceneManager.LoadScene("Scenes/Map"); }
public void InstantiateTimeManagement() { timeManagement = Instantiate(new GameObject().AddComponent <TimeManagement>()); Object.DontDestroyOnLoad(timeManagement.gameObject); }
void Awake() { instance = this; }