protected virtual void Start() { Init(); tpInput = GetComponent <vMeleeCombatInput>(); if (tpInput) { tpInput.onUpdateInput.AddListener(UpdateLockOn); } }
protected virtual void UpdateLockOn(vMeleeCombatInput tpInput) { if (this.tpInput == null) { return; } LockOnInput(); SwitchTargetsInput(); CheckForCharacterAlive(); UpdateAimImage(); }
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(); } }
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); } } }
// 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; } } }