コード例 #1
0
ファイル: vLockOn.cs プロジェクト: kelz67/ZORO
 protected virtual void Start()
 {
     Init();
     tpInput = GetComponent <vMeleeCombatInput>();
     if (tpInput)
     {
         tpInput.onUpdateInput.AddListener(UpdateLockOn);
     }
 }
コード例 #2
0
ファイル: vLockOn.cs プロジェクト: kelz67/ZORO
 protected virtual void UpdateLockOn(vMeleeCombatInput tpInput)
 {
     if (this.tpInput == null)
     {
         return;
     }
     LockOnInput();
     SwitchTargetsInput();
     CheckForCharacterAlive();
     UpdateAimImage();
 }
コード例 #3
0
 protected override void UpdateLockOn(vMeleeCombatInput tpInput)
 {
     if (shooterMelee == null ||
         shooterMelee.shooterManager == null ||
         (shooterMelee.shooterManager.useLockOn && shooterMelee.shooterManager.rWeapon != null) ||
         shooterMelee.shooterManager.useLockOnMeleeOnly && shooterMelee.shooterManager.rWeapon == null)
     {
         base.UpdateLockOn(tpInput);
     }
     else if (shooterMelee.shooterManager.rWeapon != null)
     {
         StopLockOn();
     }
 }
コード例 #4
0
        protected virtual void Start()
        {
            holderManager = GetComponent <vWeaponHolderManager>();
            var tpInput = GetComponent <vThirdPersonInput>();

            if (holderManager && tpInput)
            {
                tpInput.onUpdateInput.AddListener(ControlWeapons);
                melee = tpInput as vMeleeCombatInput;
                if (melee == null)
                {
                    Debug.LogWarning("Nee to be an vMeleeCombatInput", gameObject);
                }
            }
        }
コード例 #5
0
ファイル: PlayerInput.cs プロジェクト: PolSzarek/ColorBlood
    // Update is called once per frame
    void Update()
    {
        vMeleeCombatInput combatInput = GetComponent <vMeleeCombatInput>();
        ColorMove         colorScript = GetComponent <ColorMove>();

        if (combatInput && combatInput.isBlocking)
        {
            if (Input.GetAxis("LT") > 0.8)
            {
                colorScript.colorDefense = MoveColorEffect.BLUE;
            }
            else if (Input.GetAxis("LB") > 0.8)
            {
                colorScript.colorDefense = MoveColorEffect.RED;
            }
            else if (Input.GetAxis("RB") > 0.8)
            {
                colorScript.colorDefense = MoveColorEffect.YELLOW;
            }
            else if (Input.GetAxis("RT") > 0.8)
            {
                colorScript.colorDefense = MoveColorEffect.GREEN;
            }
        }
        else
        {
            if (Input.GetAxis("LT") > 0.8)
            {
                colorScript.colorAttack = MoveColorEffect.BLUE;
            }
            else if (Input.GetAxis("LB") > 0.8)
            {
                colorScript.colorAttack = MoveColorEffect.RED;
            }
            else if (Input.GetAxis("RB") > 0.8)
            {
                colorScript.colorAttack = MoveColorEffect.YELLOW;
            }
            else if (Input.GetAxis("RT") > 0.8)
            {
                colorScript.colorAttack = MoveColorEffect.GREEN;
            }
        }
    }