//換成黑寶石 private void BlackGem(int y, int x) { Gemstone temp = GetGemstone(y, x); temp.name = "BlackGem"; Debug.Log(temp.name + " X=" + temp.columnIndex + "| Y=" + temp.rowIndex); temp.gemstoneType = 8;//第9種寶石背景是黑 temp.GetComponentInChildren <SpriteRenderer>().sprite = Black_sprite; Debug.Log("換成黑色寶石~"); }
//換成彩虹寶石 private void RainbowGem(int y, int x) { Gemstone temp = GetGemstone(y, x); temp.name = "RainbowGem"; Debug.Log(temp.name + " X=" + temp.columnIndex + "| Y=" + temp.rowIndex); temp.gemstoneType = 7;//第8種寶石背景是虹 temp.GetComponentInChildren <SpriteRenderer>().sprite = Rainbow_sprite; Debug.Log("換彩虹寶石~"); }