Beispiel #1
0
 public void RegisterAddProductEvent(EventObserver <ProductDto> observer)
 {
     if (_onAddProductObserver == null)
     {
         _onAddProductObserver = observer;
         _onAddProductObserver.Subscribe(_onAddProduct);
     }
 }
Beispiel #2
0
        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);
        }
Beispiel #3
0
        protected override void Init()
        {
//            Screen.lockCursor = true;
//            Cursor.visible = false;
//
            base.Init();

            InitInventory();
            ChangeState <NullAgentState>();
            EventObserver.Subscribe(this);
        }