void Start() { pl = PreLoader.instance; ui = UIManager.instance; if (pl.gameData.FirstTimeLauch) { pl.gameData.Timer = 300; pl.gameData.FirstTimeLauch = false; randomItemButton.interactable = false; StartCoroutine(RandomItemCD()); } else if (pl.gameData.FirstTimeLauch == false && pl.gameData.Timer > 0) { randomItemButton.interactable = false; StartCoroutine(RandomItemCD()); } else if (pl.gameData.FirstTimeLauch == false && pl.gameData.Timer <= 0) { randomItemButton.interactable = true; } else { pl.gameData.Timer = 300; StartCoroutine(RandomItemCD()); } }
private void button1_Click(object sender, EventArgs e) { //// if (this.dataGridView1.SelectedRows.Count == 0) { return; } string id = this.dataGridView1.SelectedRows[0].Cells[0].Value.ToString(); ClientOption client = chooser.GetClientOptionById(id); if (client == null) { Console.WriteLine("ClienChoose null"); return; } PreLoader pre = new PreLoader(); pre.Initialize(client.Process); this.timer1.Enabled = false; this.Hide(); var MainForm = new MainForm(); MainForm.Closed += (s, args) => this.Close(); MainForm.Text = "MediviaBot - " + client.CharName; MainForm.Show(); }
public static void PreLoadForAssets(string pathname) { if (Mode == ABLoaderMode.Self) { if (!ResBundleMgr.mIns.Cache.ContainsLoading(pathname)) { PreLoader loader = BaseBundleLoader.CreateLoader <PreLoader>(); if (loader == null) { loader = new PreLoader(); } loader.Load(pathname); } else { LogMgr.LogErrorFormat("{0} is loading ", pathname); } } else if (Mode == ABLoaderMode.ABTang) { #if USE_TANGAB #endif } }
private void PreLoaderDoWork(object sender, DoWorkEventArgs e) { foreach (int item in ItemList) { Art.GetStatic(item); PreLoader.ReportProgress(1); } }
private void PreLoaderDoWork(object sender, DoWorkEventArgs e) { for (int i = 0; i < Gumps.GetCount(); ++i) { Gumps.GetGump(i); PreLoader.ReportProgress(1); } }
private void Start() { //Advertisement.Initialize("1644012"); //Advertisement.Initialize("1644013"); instance = this; ipm = ItemPurchaseManager.instance; pl = PreLoader.instance; }
public void loadVals() { PreLoader pl = FindObjectOfType <PreLoader> (); pl.MR = float.Parse(GameObject.Find("MRI").transform.GetChild(2).GetComponent <Text> ().text); pl.CR = float.Parse(GameObject.Find("CRI").transform.GetChild(2).GetComponent <Text> ().text); pl.PS = int.Parse(GameObject.Find("PSI").transform.GetChild(2).GetComponent <Text>().text); pl.dropD = GameObject.Find("Dropdown").GetComponent <Dropdown>().value; pl.timer = int.Parse(GameObject.Find("TI").transform.GetChild(2).GetComponent <Text> ().text); Debug.Log(pl.PS); }
public MainForm() { InitializeComponent(); Reporter = new Reporter(); //FISCA.Presentation.MotherForm.SetStatusBarMessage("初始化..."); InitializeSubjectRows(); InitializeBackgroundWorker(); InitializeSemester(); PreLoader.RunWorkerAsync(); }
private void OnClickPreload(object sender, EventArgs e) { if (PreLoader.IsBusy) { return; } ProgressBar.Minimum = 1; ProgressBar.Maximum = Gumps.GetCount(); ProgressBar.Step = 1; ProgressBar.Value = 1; ProgressBar.Visible = true; PreLoader.RunWorkerAsync(); }
private void OnClickPreload(object sender, EventArgs e) { if (PreLoader.IsBusy) { return; } ProgressBar.Minimum = 1; ProgressBar.Maximum = listView1.Items.Count; ProgressBar.Step = 1; ProgressBar.Value = 1; ProgressBar.Visible = true; PreLoader.RunWorkerAsync(ProgressBar); }
/// <summary> /// Optional warmup of types for better performance /// </summary> public static async Task WarmUpAsync(params Type[] types) { var p = new PreLoader(); List <Task> tasks = new List <Task> { p.PreloadDecimal(), p.PreloadGuid(), p.PreloadInt(), p.PreloadString() }; tasks.AddRange(types.Select(p.PreloadType)); await Task.WhenAll(tasks); }
void Start() { pl = PreLoader.instance; ipm = ItemPurchaseManager.instance; //Currency currentTokensText.text = pl.gameData.TokenTotal.ToString(); currentGemsText.text = pl.gameData.GemTotal.ToString(); //Items hhQuantityText.text = pl.gameData.HealthyHeartItem.ToString(); ssQuantityText.text = pl.gameData.StrongShieldItem.ToString(); llQuantityText.text = pl.gameData.LudacrisLightningItem.ToString(); sskipQuantityText.text = pl.gameData.SaucySkipItem.ToString(); }
void Awake() { if (instance == null) { instance = this; } else { Destroy(this); return; } DontDestroyOnLoad(this); SceneManager.LoadScene("Main"); }
void Start() { m_loader = new PreLoader(); // Begin pre load m_preloadTask = new CoroutineTask(m_loader.Load()); m_logoDisplayTask = new CoroutineTask(WaitLogoDisplayTime(), false); m_logo = gameObject.transform.Find("Logo").gameObject.GetComponent <RawImage>(); Color cur = m_logo.color; cur.a = 0; m_logo.color = cur; m_logoFade = m_logo.GetComponent <Fade>(); m_logoFade.FadeInTimed(m_logoFadeTime, () => { m_logoDisplayTask.Start(); }); }
// void Start() { instance = this; DontDestroyOnLoad(gameObject); if (PlayerPrefs.HasKey("highScore")) { highScore = PlayerPrefs.GetInt("highScore"); currentScore = PlayerPrefs.GetInt("currentScore"); musicState = (PlayerPrefs.GetInt("musicState") == 1)?true:false; soundState = (PlayerPrefs.GetInt("soundState") == 1)?true:false; dpadState = (PlayerPrefs.GetInt("dpadState") == 1)?true:false; } else { Save(); } }
public void GenerateInitial() { PreLoader pl = FindObjectOfType <PreLoader> (); SelectionMethod mySlm; totalStepsPerEpoch = pl.timer; float mutate = pl.MR; int SlmNum = pl.dropD; tankCount = pl.PS; if (SlmNum == 0) { mySlm = SelectionMethod.Natural; } else if (SlmNum == 1) { mySlm = SelectionMethod.Competitive; } else { mySlm = SelectionMethod.Random_ForFun; } // Debug.Log (pl.PS); m_evolver = new GeneticOptimisation(tankCount, mutate, mySlm); for (var i = 0; i < tankCount; i++) { var rp = Random.insideUnitSphere; rp.y = 0; rp = generatePoint.position + rp.normalized * Random.Range(1, generateRadius); m_initPosition.Add(rp); m_drivers.Add(Instantiate(tankPrefab, rp, Quaternion.identity).GetComponent <TankDriver>()); m_drivers[i].GetComponent <Tank>().Setup(); m_evolver.population.Add(m_drivers[i].network); } m_evolver.RandomizePopulation(); }
void Awake() { pl = PreLoader.instance; instance = this; questionText = questionTextGO.GetComponent <TextMeshProUGUI>(); answerAText = answerAGO.GetComponent <TextMeshProUGUI>(); answerBText = answerBGO.GetComponent <TextMeshProUGUI>(); answerCText = answerCGO.GetComponent <TextMeshProUGUI>(); answerDText = answerDGO.GetComponent <TextMeshProUGUI>(); hhQuantityText = hhQuantityGO.GetComponent <TextMeshProUGUI>(); ssQuantityText = ssQuantityGO.GetComponent <TextMeshProUGUI>(); llQuantityText = llQuantityGO.GetComponent <TextMeshProUGUI>(); sskipQuantityText = sskipQuantityGO.GetComponent <TextMeshProUGUI>(); egScoreText = egScoreGO.GetComponent <TextMeshProUGUI>(); egTokensText = egTokensGO.GetComponent <TextMeshProUGUI>(); egGemsText = egGemsGO.GetComponent <TextMeshProUGUI>(); }
private void runDiagnostics() { PreLoader.Loader(); ALoader.TimeIt(this, 1913); }
void Awake() { pl = PreLoader.instance; }