Пример #1
0
 void Start()
 {
     if (isActivated)
     {
         Number.sprite = NumberSprite [NeoBlock.GetBlockNum(BlockColor)];
     }
     else if (!isActivated)
     {
         Number.sprite = null;
     }
 }
Пример #2
0
 public static int SetMotherBlock(NeoBlock motherB)
 {
     if (!instances [0].motherBlock)
     {
         instances [0].motherBlock = motherB;
         return(0);
     }
     else
     {
         instances [1].motherBlock = motherB;
         return(1);
     }
 }
Пример #3
0
    // 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;
            }
        }
    }
Пример #4
0
 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;
         }
     }
 }