// Start is called before the first frame update void Start() { manger = FindObjectOfType <Game_Manger>(); order = Random.Range(0, 14); bubble = transform.Find("bubble").gameObject; thought = transform.Find("bubble").transform.Find("whatiwant").gameObject; thought.GetComponent <SpriteRenderer>().sprite = thoghtHandler[order]; }
// Use this for initialization void Start() { // Default position not valid? Then it's game over if (!isValidGridPos()) { Game_Manger.getInstance().AddGold(); Destroy(gameObject); } }
private float lastUsePSkill; //上一次发动宠物技能的时间 void Start() { game_instance = this; Gold = Date_Manger.mydate_Instance.Gold; if (Gold == 0) { Gold = 100000; } DisGold(); }
public virtual void levelup() { if (level < 3 && Game_Manger.getInstance().Gold >= upCost) { level++; lighting(); Game_Manger.getInstance().CostGold(upCost); upCost = 10000 * (level + 1); myText.text = level + "级"; } }
public void OnPress_Start() { if (hasChoose) { Game_Manger.getInstance().SkillMultiple = level * 0.25 + 1; } else { Game_Manger.getInstance().SkillMultiple = 1; } }
public static void deleteRow(int y)//Single row at once { for (int x = 0; x < w; ++x) { if (grid[x, y]) { Destroy(grid[x, y].gameObject); grid[x, y] = null; } } Game_Manger.getInstance().AddScores(100); }
public void StartGame() { Grid.clear(); Game_Manger.getInstance().Scores = 0; Game_Manger.getInstance().DisScores(); Game_Manger.getInstance().CurrentPet(); if (nextDrop) { Destroy(nextDrop); } int i = Random.Range(0, groups.Length); isDrop = Instantiate(groups[i], transform.position, Quaternion.identity) as GameObject; i = Random.Range(0, groups.Length); nextDrop = Instantiate(groups[i], new Vector2(10.5f, 15.5f), Quaternion.identity) as GameObject; nextDrop.transform.localScale = new Vector2(0.5f, 0.5f); nextDrop.GetComponent <Group>().enabled = false; }
void Awake() { _instance = this; }
public void OnPress_RChoosing() { UI_Manger.Instance.PageTransition(UIState.Choosing); Game_Manger.getInstance().hasStart = false; }