Exemple #1
0
    public ViewBlock CreateBlock(Nine.Core.Block block)
    {
        var blockSprite = GetBlockSprite(block);

        ViewBlock viewBlock = MonoBehaviour.Instantiate <ViewBlock>(BaseBlock);

        viewBlock.Block = block;
        viewBlock.gameObject.GetComponent <SpriteRenderer>().sprite = blockSprite;

        return(viewBlock);
    }
Exemple #2
0
 public Binding(ViewBlock vb, ModelBlock mb, UnityEvent viewModelEvent)
 {
     this.vb            = vb;
     this.mb            = mb;
     environmentChanged = viewModelEvent;
 }
Exemple #3
0
 public void Initialize(ViewBlock parent, ComponentBinding binding)
 {
     this.parent          = parent;
     this.binding         = binding;
     this.initializeValue = 3;
 }