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); }
public Binding(ViewBlock vb, ModelBlock mb, UnityEvent viewModelEvent) { this.vb = vb; this.mb = mb; environmentChanged = viewModelEvent; }
public void Initialize(ViewBlock parent, ComponentBinding binding) { this.parent = parent; this.binding = binding; this.initializeValue = 3; }