void Start() { if (isActivated) { Number.sprite = NumberSprite [NeoBlock.GetBlockNum(BlockColor)]; } else if (!isActivated) { Number.sprite = null; } }
public static int SetMotherBlock(NeoBlock motherB) { if (!instances [0].motherBlock) { instances [0].motherBlock = motherB; return(0); } else { instances [1].motherBlock = motherB; return(1); } }
// Update is called once per frame void OnMouseDown() { if (RewardAdButton.isChoosing) { return; } int BlockNum = NeoBlock.GetBlockNum(BlockColor); if (isActivated && Enabled && BlockNum > 0) { //Number.transform.position = T.position + K * new Vector3 (Co, Si, 0.0f); MotherBlock.SendMessage("Cloose", BlockColor); MotherBlock.SendMessage("ReduceBlock", BlockColor); Number.sprite = NumberSprite[BlockNum]; if (BlockNum.Equals(0)) { //S.enabled = false; C.enabled = false; } } }
public void ResetNumber() { if (NeoBlock.GetBlockNum(BlockColor) > 0) { isActivated = true; } if (isActivated) { Number.sprite = NumberSprite [NeoBlock.GetBlockNum(BlockColor)]; if (NeoBlock.GetBlockNum(BlockColor).Equals(0)) { //S.enabled = false; C.enabled = false; } else if (NeoBlock.GetBlockNum(BlockColor) > 0) { S.enabled = true; C.enabled = true; } } }