示例#1
0
    /// <summary>
    /// Генерация цвета по цифровому коду
    /// </summary>
    /// <param name="ID"></param>
    public void SetRandomType(int ID)
    {
        if (spriteRenderer == null)
        {
            spriteRenderer = GetComponent <SpriteRenderer>();
        }

        colorID = ID;
        type    = GetColor();
        spriteRenderer.sprite = spritesOfCrystal[colorID];
    }
示例#2
0
 void Update()
 {
     if (!cell.gameField.CheckMove())
     {
         return;
     }
     if (cell.gameField.inRotate)
     {
         return;
     }
     if (cell.gameField.moveCrystals.Count != 0)
     {
         return;
     }
     if (type == TypeOfCrystal.starOfDeath && cell.targetOfDeathStar)
     {
         type = TypeOfCrystal.None;
         ScoreManager.AddDeathStar();
         cell.destroyEffect.Activate(gameObject, true, 1000);
     }
 }
示例#3
0
 public void SetType(TypeOfCrystal type)
 {
     typeOfCrystal = type;
 }
示例#4
0
 public void Star(Field _field, Crystal _crystal)
 {
     field         = _field;
     crystal       = _crystal;
     typeOfCrystal = crystal.type;
 }