Exemplo n.º 1
0
        private void Start()
        {
            var input = GetComponent <IPlayerInput>();

            cc       = GetComponent <CapsuleCollider>();
            core     = GetComponent <PlayerCore>();
            playerCP = GetComponent <PlayerCloudPoint>();
            rb       = GetComponent <Rigidbody>();
            jumper   = GetComponent <PlayerJumper>();

            input?.OnCreateCloudButtonObservable
            .Where(x => x)
            .Subscribe(_ => CreateCloud());
        }
Exemplo n.º 2
0
        void Start()
        {
            var health = GetComponent <PlayerHealth>();

            cloudPoint = GetComponent <PlayerCloudPoint>();

            playerMeshList = GetAllChildren.GetAll(this.gameObject)
                             .Select(x => x.GetComponent <SkinnedMeshRenderer>())
                             .Where(x => x != null)
                             .ToList();

            health.ReceiveDamageObservable
            .Subscribe(_ => Flash(health.InvincibleTime));

            cloudPoint.IsRecovering
            .Where(x => x)
            .Subscribe(_ => Charge());
        }
Exemplo n.º 3
0
        private void Start()
        {
            var input = GetComponent <IPlayerInput>();

            playerCP = GetComponent <PlayerCloudPoint>();
            core     = GetComponent <PlayerCore>();
            //foreach(var cloud in attackClouds)
            //{
            //    AttackCloudDictionary.Add(cloud.GetAttackCloudEnum);
            //}

            input.OnCreateAttackCloudKeybordObservable
            .ThrottleFirstFrame(0)
            .Subscribe(x => ChangeAttackCloudKeybord(x));

            input.OnSelectAttackCloudObsrvable
            .Where(v => v.magnitude != 0f)
            .Subscribe(v => ChangeAttackCloudGamePad(v));

            input.OnCreateAttackCloudObservable
            .Where(x => x && canCreateCloud)
            .Subscribe(_ => CreateAttackCloud(CloudPrehabs.Instance.AttackCloudDicitionary2[currentAttackCloud.Value]));
        }