private void ObjectAddedHandler(string frontObjectName, FrontObject obj) { if (frontObjectName != targetObjectName) { return; } var component = ComponentConstructor(); component.Initialize(obj); FrontSystem.Components.Add(obj.Identifier, component); }
public void RemoveComponentOfObject(FrontObject obj) { if (Components.TryGet(obj.Identifier, out List <FrontObjectComponent> components)) { var tmpList = new List <FrontObjectComponent>(components); foreach (var comp in tmpList) { comp.Dispose(); Components.Remove(obj.Identifier, comp); } } }
internal void Initialize(FrontObject obj) { Object = obj; InnerInitialize(); }
// Start is called before the first frame update void Start() { buttonRef = GetComponent <UnityEngine.UI.Button>(); buttonRef.onClick.AddListener(ClickHandler); frontObject = GetComponent <FrontObject>(); }
private void ViewObjectRemovedHandler(string id, FrontObject obj) { RemoveComponentOfObject(obj); }
// Start is called before the first frame update void Start() { inputFieldRef.onSubmit.AddListener(OnSubmitHandler); buttonRef.onClick.AddListener(SubmitValue); frontObject = GetComponent <FrontObject>(); }