public Entity AddSelectionListener(ISelectListener newListener) { var component = CreateComponent <SelectionListenerComponent>(CoreComponentIds.SelectionListener); component.listener = newListener; return(AddComponent(CoreComponentIds.SelectionListener, component)); }
private void Awake() { isSelect = false; selectListener = GameObject.Find("GameController").GetComponent <GameController>(); _spriteRenderer = GetComponent <SpriteRenderer>(); _outline = transform.Find("outline").gameObject; }
public Entity ReplaceSelectionListener(ISelectListener newListener) { var component = CreateComponent <SelectionListenerComponent>(CoreComponentIds.SelectionListener); component.listener = newListener; ReplaceComponent(CoreComponentIds.SelectionListener, component); return(this); }