public void RegisterAddProductEvent(EventObserver <ProductDto> observer) { if (_onAddProductObserver == null) { _onAddProductObserver = observer; _onAddProductObserver.Subscribe(_onAddProduct); } }
public void Fire() { GameObject smokeInsr = PooledObjects.Instance.RequestGameObject(GameObjectPool.SmokeGrenade); Vector3 deployPosition = agent.transform.position; smokeInsr.transform.position = deployPosition; EventTrigger smokeBomb = new CustomEvent(deployPosition, EventSubject.SmokeBomb, GameConfig.smokeBombPriotity, GameConfig.smokeBombEnableTime, false); EventObserver.Subscribe(smokeBomb); }
protected override void Init() { // Screen.lockCursor = true; // Cursor.visible = false; // base.Init(); InitInventory(); ChangeState <NullAgentState>(); EventObserver.Subscribe(this); }