void deSelectButton() { if (Input.GetMouseButtonDown(1)) { if (curActionButton != null) { curActionButton.GetComponent <Image>().color = Color.white; curActionButton = null; } } }
//---< LZ // Start is called before the first frame update void Start() { brevicepNumber = 10000; devilNumber = 7000; dunnartNubmer = 100000; emuNumber = 600000; gobyNumber = 2000; koalaNumber = 100000; platypusNumber = 30000; quollNumber = 10000; //calculate the number of animals on each tile brevicepNumberOneTile = brevicepNumber / 10; devilNumberOneTile = devilNumber / 2; dunnartNubmerOneTile = dunnartNubmer / 7; emuNumberOneTile = emuNumber / 10; gobyNumberOneTile = gobyNumber / 10; koalaNumberOneTile = koalaNumber / 6; platypusNumberOneTile = platypusNumber / 5; quollNumberOneTile = quollNumber / 3; grid = new List <List <GameObject> >(); GameObject tempGO = new GameObject("Map"); map = tempGO; map.transform.position = Camera.main.transform.position; gold = 4000000; time = 2; fireman = 6000; GenarateMap(); //update resource display at the beginning totalAnimalNumber = brevicepNumber + devilNumber + dunnartNubmer + emuNumber + gobyNumber + koalaNumber + platypusNumber + quollNumber; //updateResourceDisplay(); curActionButton = null; startGold = gold; startFireman = fireman; startTotalAnimals = totalAnimalNumber; updateResourceDisplay(); }