void Start() { clickSound = Deer.GetComponent <AudioSource>(); bgMusic = GetComponent <AudioSource>(); int randomnum = Random.Range(0, 5); for (int i = 0; i < randomnum; i++) { randomPos(x); } check2 = 0; check = 0; time = 0; BeariniPost = Bear.transform.position; FoxiniPost = Fox.transform.position; FroginiPost = Frog.transform.position; MiceiniPost = Mice.transform.position; CatiniPost = Cat.transform.position; KanciliniPost = Kancil.transform.position; CowiniPost = Cow.transform.position; DeeriniPost = Deer.transform.position; Cat.SetActive(false); Cow.SetActive(false); Kancil.SetActive(false); Bear.SetActive(false); Fox.SetActive(false); Frog.SetActive(false); Mice.SetActive(false); buttonnext1.SetActive(false); }
public void allinactive() { Cat.SetActive(false); Cow.SetActive(false); Kancil.SetActive(false); Deer.SetActive(false); Bearblack.SetActive(false); Foxblack.SetActive(false); Frogblack.SetActive(false); Bear.SetActive(false); Fox.SetActive(false); Frog.SetActive(false); Mice.SetActive(false); Deer.SetActive(false); Catblack.SetActive(false); Miceblack.SetActive(false); Kancilblack.SetActive(false); Cowblack.SetActive(false); Deerblack.SetActive(false);; }
public void DropCow() { float Distance = Vector3.Distance(Cow.transform.position, Cowblack.transform.position); if (Distance < 50) { Cow.transform.position = Cowblack.transform.position; Kancil.SetActive(true); clickSound.Play(); ScoreDrag.totalscore += 20; Cowb = false; check++; // level2++; // level3++; } else { Cow.transform.position = CowiniPost; } }