Пример #1
0
        public Entity AddSelectionListener(ISelectListener newListener)
        {
            var component = CreateComponent <SelectionListenerComponent>(CoreComponentIds.SelectionListener);

            component.listener = newListener;
            return(AddComponent(CoreComponentIds.SelectionListener, component));
        }
Пример #2
0
 private void Awake()
 {
     isSelect        = false;
     selectListener  = GameObject.Find("GameController").GetComponent <GameController>();
     _spriteRenderer = GetComponent <SpriteRenderer>();
     _outline        = transform.Find("outline").gameObject;
 }
Пример #3
0
        public Entity ReplaceSelectionListener(ISelectListener newListener)
        {
            var component = CreateComponent <SelectionListenerComponent>(CoreComponentIds.SelectionListener);

            component.listener = newListener;
            ReplaceComponent(CoreComponentIds.SelectionListener, component);
            return(this);
        }