예제 #1
0
파일: Cell.cs 프로젝트: Lemon113/ThreeRow
 public void SetBonus(IBonus newBonus)
 {
     if (_bonus == null)
     {
         _bonus = newBonus;
         if (newBonus is GameObject)
         {
             transform.AddChild(((GameObject)newBonus).transform);
         }
     }
     else
     {
         if (newBonus.GetType() == typeof(BombBonus))
         {
             _bonus = newBonus;
             if (newBonus is GameObject)
             {
                 transform.AddChild(((GameObject)newBonus).transform);
             }
         }
     }
 }