public void CollideOrganelle(Organelle o) { if (o is Mitochondria) { imgPlayer = imgPlayerMito; } else if (o is Lysosome) { imgPlayer = imgPlayerMitoLyso; } else if (o is ER) { imgPlayer = imgPlayerMitoLysoER; } else if (o is Centromere) { imgPlayer = imgPlayerComplete; if (GameSystem.formStage.chapterSurvival != null) { GameSystem.formStage.Invoke( (Action) delegate() { GameSystem.formStage.gonnaEvolve.Start(); }); } } images = imgPlayer; }
private void LateUpdate() { mouseClickLastFrame = Input.GetMouseButtonUp(0); if (mouseClickLastFrame && !selLastFrame) { selected = null; ActionPanel.SetActive(false); } selLastFrame = false; }
// Initliaze the Organelle with Initial Values public void IniOrganelle() { for(int i = 0; i < _Organelle.Length; i++) { _Organelle[i] = new Organelle(); _Organelle[i].Name = ((OrganelleName)i).ToString(); if(_Organelle[i].Name == "Mitochondria") { _Organelle[i].EnabledProcess = "AerobicResp"; _Organelle[i].CurValue = 1; } else if(_Organelle[i].Name == "Chloroplast") { _Organelle[i].EnabledProcess = "Photosynthesis"; _Organelle[i].CurValue = 0; } else if(_Organelle[i].Name == "Ribosome") { _Organelle[i].EnabledProcess = ""; _Organelle[i].CurValue = 0; } else if(_Organelle[i].Name == "Ribosome") { _Organelle[i].EnabledProcess = ""; _Organelle[i].CurValue = 0; } else if(_Organelle[i].Name == "Vacuole") { _Organelle[i].EnabledProcess = ""; _Organelle[i].CurValue = 0; } else if(_Organelle[i].Name == "Flagellum") { _Organelle[i].EnabledProcess = ""; _Organelle[i].CurValue = 0; } else if(_Organelle[i].Name == "Cilia") { _Organelle[i].EnabledProcess = ""; _Organelle[i].CurValue = 0; } else if(_Organelle[i].Name == "Wall") { _Organelle[i].EnabledProcess = ""; _Organelle[i].CurValue = 0; } } }
public void Pause_Click(object sender, EventArgs e) { if (panelTip.Visible) { ExitTip(); } else { if (chapterTutorial != null) { chapterTutorial.Pause(); } else if (chapterSurvival != null) { chapterSurvival.Pause(); } if (chapter == EChapter.Tutorial) { if (sender != picBoxPause) { picBoxPauseGif.Visible = false; if (sender is Mitochondria) { panelTip.BackgroundImage = Resources.MitoIntro; } else if (sender is Lysosome) { panelTip.BackgroundImage = Resources.LysoIntro; } else if (sender is ER) { panelTip.BackgroundImage = Resources.ERIntro; } else if (sender is Centromere) { panelTip.BackgroundImage = Resources.CentroIntro; if (chapter == EChapter.Tutorial) { isNextChapter = true; } } } else { picBoxPauseGif.Visible = true; } panelTip.Visible = true; } else if (chapter == EChapter.Survival) { if (sender is Organelle) { Organelle o = sender as Organelle; picBoxEvolveEffect.Left = (o.Position.X + GameSystem.player.Position.X - picBoxEvolveEffect.Width) / 2; picBoxEvolveEffect.Top = (o.Position.Y + GameSystem.player.Position.Y - picBoxEvolveEffect.Height) / 2; picBoxEvolveEffect.Show(); timerEvolve.Start(); MCImusic.mciMusic("Musics/get1.wav", "play"); } else if (sender is Player) { Player p = sender as Player; picBoxEvolveEffect.Left = p.Position.X - (picBoxEvolveEffect.Width / 2); picBoxEvolveEffect.Top = p.Position.Y - (picBoxEvolveEffect.Height / 2); picBoxEvolveEffect.Show(); timerEvolve.Start(); MCImusic.mciMusic("Musics/get1.wav", "play"); } } } }