private void OnTriggerEnter2D(Collider2D collision) { snap thisSnap = collision.gameObject.GetComponent <snap>(); if (thisSnap) { currentSnap.Add(thisSnap); } }
private void OnTriggerExit2D(Collider2D collision) { snap thisSnap = collision.gameObject.GetComponent <snap>(); if (thisSnap) { if (currentSnap.Contains(thisSnap)) { currentSnap.Remove(thisSnap); } } }
private void oyunSecme() { RadioButton radioBtn = this.Controls.OfType <RadioButton>() .Where(x => x.Checked).FirstOrDefault(); if (radioBtn != null) { switch (radioBtn.Name) { case "radio_faceLock": faceLock faceLock = new faceLock(); this.Hide(); faceLock.Show(); break; case "radio_snap": snap snap = new snap(); this.Hide(); //snap.Show(); break; case "radio_shyPanda": shypanda shypanda = new shypanda(); this.Hide(); shypanda.Show(); break; case "radio_zombieEscape": zombie zombie = new zombie(); this.Hide(); zombie.Show(); break; case "radio_chameleon": chameleon chameleon = new chameleon(); this.Hide(); chameleon.Show(); break; case "radio_colors": colors color = new colors(); this.Hide(); color.Show(); break; case "radio_imageText": imageToTextGame game = new imageToTextGame(); this.Hide(); game.Show(); break; case "radio_figureGame": figureGame figure = new figureGame(); this.Hide(); figure.Show(); break; case "radio_rockPaperScissors": rockpaperscissors rockpaperscissors = new rockpaperscissors(); this.Hide(); rockpaperscissors.Show(); break; case "radio_titanic": titanic titanic = new titanic(); this.Hide(); titanic.Show(); break; } } }