Ejemplo n.º 1
0
 // Use this for initialization
 void Start()
 {
     // Default position not valid? Then it's game over
     if (!isValidGridPos())
     {
         Game_Manger.getInstance().AddGold();
         Destroy(gameObject);
     }
 }
Ejemplo n.º 2
0
 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 + "级";
     }
 }
Ejemplo n.º 3
0
 public void OnPress_Start()
 {
     if (hasChoose)
     {
         Game_Manger.getInstance().SkillMultiple = level * 0.25 + 1;
     }
     else
     {
         Game_Manger.getInstance().SkillMultiple = 1;
     }
 }
Ejemplo n.º 4
0
 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);
 }
Ejemplo n.º 5
0
    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;
    }
Ejemplo n.º 6
0
 public void OnPress_RChoosing()
 {
     UI_Manger.Instance.PageTransition(UIState.Choosing);
     Game_Manger.getInstance().hasStart = false;
 }