Пример #1
0
        protected void Awake()
        {
            Stream          = new WeaponStream();
            _canInstantiate = new ReactiveProperty <bool>(true);

            _instantiator = new SkillInstantiator(this, _player);
            _ctManager    = new SkillCTManager(this, _player);

            _player.Level.Cur
            .Subscribe(level => {
                if (level == 3)
                {
                    Stream.OnNextSkillAvailable(1);
                }
                else if (level == 5)
                {
                    Stream.OnNextSkillAvailable(2);
                }
                else if (level == 7)
                {
                    Stream.OnNextSkillAvailable(3);
                }
                else if (level == 8)
                {
                    Stream.OnNextSkillAvailable(4);
                }
            });

            this.UpdateAsObservable()
            .Take(1)
            .Where(_ => {
                return(Client.Opponents.Contains(_player));
            })
            .Subscribe(_ => _renderer.sprite = _opponentSprite);
        }
Пример #2
0
        protected void Awake()
        {
            Stream          = new WeaponStream();
            _canInstantiate = new ReactiveProperty <bool>(true);

            _instantiator = new SkillInstantiator(this, _player);
            _ctManager    = new SkillCTManager(this, _player);
        }