예제 #1
0
        public bool OnEvent(CapacitiesComponentEvent gameEvent)
        {
            this.CapacitiesDirty = true;

            // always listen on capacities component
            return(true);
        }
        public bool OnEvent(CapacitiesComponentEvent gameEvent)
        {
            if (!this.gameObject.activeSelf)
            {
                return(false);
            }

            bool active = !(this._entity is null) && this._entity.Equals(gameEvent.CapacitiesComponent.entity);

            // only update capacities
            if (active)
            {
                capacitiesUi.OnNeedUpdate();
            }

            return(active);
        }