void Awake() { attacking = GetComponent <PlayerAttacking>(); playerInventory = GetComponent <PlayerInventory>(); playerManager = GetComponent <PlayerManager>(); weaponSlotManager = GetComponentInChildren <WeaponSlotManager>(); uiManager = FindObjectOfType <UIManager>(); }
public override void AttemptToConsumeItem(AnimatorHandler playerAnimatorManager, WeaponSlotManager weaponSlotManager, PlayerEffectsManager playerEffectsManager) { base.AttemptToConsumeItem(playerAnimatorManager, weaponSlotManager, playerEffectsManager); GameObject flask = Instantiate(itemModel, weaponSlotManager.leftHandSlot.transform); //instanciamos el modelo del item en la mano derecha playerEffectsManager.currentParticleFX = recoveryFX; //le pasamos el fx playerEffectsManager.amountToBeHealed = healthRecoverAmount; //le pasamos la vida que le tiene que sumar playerEffectsManager.instantiatedFXModel = flask; weaponSlotManager.leftHandSlot.UnloadWeapon(); //ocultamos arma en la mano para poner el item consumible }
private void Awake() { cameraHandler = FindObjectOfType <CameraHandler>(); animatorHandler = GetComponent <AnimatorHandler>(); weaponSlotManager = GetComponent <WeaponSlotManager>(); playerManager = GetComponentInParent <PlayerManager>(); inputHandler = GetComponentInParent <InputHandler>(); playerInventory = GetComponentInParent <PlayerInventory>(); playerStats = GetComponentInParent <PlayerStats>(); }
private void Awake() //se llama al cargar la isntancia del script { weaponSlotManager = GetComponentInChildren <WeaponSlotManager>(); try{ EquipCurrentFireWeapon(); EquipCurrentWeapon(); }catch (Exception ex) { } }
public virtual void AttemptToConsumeItem(AnimatorHandler playerAnimatorManager, WeaponSlotManager weaponSlotManager, PlayerEffectsManager playerEffectsManager) { if (currentItemAmount > 0 && maxItemAmount >= currentItemAmount) //si tiene items que consumir { //hacer animacion playerAnimatorManager.PlayTargetAnimation(consumeAnimation, isInteracting); currentItemAmount = currentItemAmount - 1; } else { //hacer animacion de que no tiene mas consumibles , deteniendo al player un instante //playerAnimatorManager.PlayTargetAnimation("Shrug", true); } }
private void Awake() { playerAttacker = GetComponent <PlayerAttacker>(); playerInventory = GetComponent <PlayerInventory>(); playerManager = GetComponent <PlayerManager>(); tutorial = FindObjectOfType <tutorialHandler>(); playerEffectsManager = GetComponentInChildren <PlayerEffectsManager>(); playerAnimatorManager = GetComponentInChildren <AnimatorHandler>(); weaponSlotManager = GetComponentInChildren <WeaponSlotManager>(); playerLocomotion = GetComponent <PlayerLocomotion>(); playerStats = GetComponent <PlayerStats>(); cameraHolder = FindObjectOfType <CameraHolder>(); UIManager = FindObjectOfType <UIManager>(); help_input = false; }
private void Awake() { slotManager = GetComponentInChildren <WeaponSlotManager>(); }
void Awake() { playerInventory = FindObjectOfType <PlayerInventory>(); weaponSlotManager = FindObjectOfType <WeaponSlotManager>(); uiManager = GetComponentInParent <UIManager>(); }
private void Awake() { weaponSlotManager = GetComponent <WeaponSlotManager>(); }
void Awake() { animHandler = GetComponentInChildren <PlayerAnimatorHandler>(); inputHandler = GetComponent <InputHandler>(); weaponSlotManager = GetComponentInChildren <WeaponSlotManager>(); }
private void Awake() { playerStats = GetComponentInParent <PlayerStats>(); weaponSlotManager = GetComponentInParent <WeaponSlotManager>(); inputHandler = GetComponentInParent <InputHandler>(); }
public override void SuccessfullyCastSpell(AnimatorHandler animatorHandler, PlayerStats playerStats, CameraHandler cameraHandler, WeaponSlotManager weaponSlotManager) { base.SuccessfullyCastSpell(animatorHandler, playerStats, cameraHandler, weaponSlotManager); GameObject instantiatedProjectile = Instantiate(spellCastFX, weaponSlotManager.rightHandSlot.transform.position, cameraHandler.cameraPivotTransform.rotation); rigidbody = instantiatedProjectile.GetComponent <Rigidbody>(); if (cameraHandler.currentLockOnTarget != null) { instantiatedProjectile.transform.LookAt(cameraHandler.currentLockOnTarget.transform); } else { instantiatedProjectile.transform.rotation = Quaternion.Euler(cameraHandler.cameraPivotTransform.eulerAngles.x, playerStats.transform.eulerAngles.y, 0); } rigidbody.AddForce(instantiatedProjectile.transform.forward * projectileForwardVelocity); rigidbody.AddForce(instantiatedProjectile.transform.up * projectileUpwardVelocity); rigidbody.useGravity = isEffectedByGravity; rigidbody.mass = projectileMass; instantiatedProjectile.transform.parent = null; }
public override void AttemptToCastSpell(AnimatorHandler animatorHandler, PlayerStats playerStats, WeaponSlotManager weaponSlotManager) { base.AttemptToCastSpell(animatorHandler, playerStats, weaponSlotManager); GameObject instantiateWarmUpSpellFX = Instantiate(spellWarmUpFX, weaponSlotManager.rightHandSlot.transform); //instantiateWarmUpSpellFX.gameObject.transform.localScale = new Vector3(100, 100, 100); animatorHandler.PlayTargetAnimation(spellAnimation, true); }
public virtual void SuccessfullyCastSpell(AnimatorHandler animatorHandler, PlayerStats playerStats, CameraHandler cameraHandler, WeaponSlotManager weaponSlotManager) { Debug.Log("You cast a cast"); }
public virtual void AttemptToCastSpell(AnimatorHandler animatorHandler, PlayerStats playerStats, WeaponSlotManager weaponSlotManager) { Debug.Log("you attempt to cast a spell"); }