Exemplo n.º 1
0
 private void EditBonusBrick(BonusBrick NewBonusBrick, int IdOfNewBrick)
 {
     NewBonusBrick.DestroyEffect = DeathEffect;
     NewBonusBrick.BonusObject   = BonusManagerObject.BonusList[IdOfNewBrick].BonusObject;
     NewBonusBrick.Newsprite     = BonusManagerObject.BonusList[IdOfNewBrick].BonusBrickSprite;
     NewBonusBrick.ChangeBrickColorAndAddBonusToBrick();
 }
Exemplo n.º 2
0
    private void ChangeBrickToBonusAndEditIt(List <Brick> ContentList)
    {
        int NewBonuceBrick = GenerateRandomNumber(0, MaximumBricks + 1);
        int RandomBrick    = GenerateRandomNumber(0, BonusManagerObject.BonusList.Length);

        Destroy(ContentList[NewBonuceBrick]);
        BonusBrick NewContentBonusBrick = ContentList[NewBonuceBrick].gameObject.AddComponent <BonusBrick>();

        EditBonusBrick(NewContentBonusBrick, RandomBrick);
    }