public GameObject ConstructAndBindViewLink(Vector3 to, Vector3 from) { var gameObjectLink = Instantiate(linkPrefab, new Vector3(0, 0, 0), Quaternion.identity); var viewLink = gameObjectLink.GetComponent <ViewLink>(); var modelLink = new ModelLink(to, from); var linkBinding = new LinkBinding(viewLink, modelLink, environmentChanged); linkBindings.Add(linkBinding); me.AddLink(modelLink); viewLink.Initialize(to, from, linkBinding); return(gameObjectLink); }
public void Initialize(Vector3 to, Vector3 from, LinkBinding binding) { SetTargets(to, from); this.binding = binding; }
public void DeleteLink(LinkBinding binding) { binding.DeleteFromViewAndModel(me); linkBindings.Remove(binding); me.RemoveLink(binding.ml); }