Наследование: GenericDisplayedBioBrick
 void createBioBricksIfNecessary()
 {
     Logger.Log("EquipedDisplayedDevice::createBioBricksIfNecessary", Logger.Level.DEBUG);
     initIfNecessary();
     if (0 == _currentDisplayedBricks.Count)
     {
         if (_device != null)
         {
             //add biobricks
             int index = 0;
             foreach (ExpressionModule module in _device.getExpressionModules())
             {
                 foreach (BioBrick brick in module.getBioBricks())
                 {
                     GenericDisplayedBioBrick dbbrick = TinyBioBrickIcon.Create(transform, getNewPosition(index), null, brick);
                     _currentDisplayedBricks.AddLast(dbbrick);
                     index++;
                 }
             }
         }
         else
         {
             Logger.Log("EquipedDisplayedDevice::createBioBricksIfNecessary _device == null", Logger.Level.WARN);
         }
     }
 }
Пример #2
0
    public static TinyBioBrickIcon Create(
        Transform parentTransform
        , Vector3 localPosition
        , string spriteName
        , BioBrick biobrick
        )
    {
        TinyBioBrickIcon result = (TinyBioBrickIcon)GenericDisplayedBioBrick.Create(
            parentTransform
            , localPosition
            , spriteName
            , biobrick
            , genericPrefab
            );

        return(result);
    }