public HandleEvent ( GameObject in_gameObject ) : void | ||
in_gameObject | GameObject | |
Résultat | void |
void Wwise_BillieJean() { if (BillieJean != null) { BillieJean.HandleEvent(gameObject); } }
void Wwise_MuerteH() { if (MuerteH != null) { MuerteH.HandleEvent(gameObject); } }
void Wwise_ExplosionP() { if (ExplosionP != null) { ExplosionP.HandleEvent(gameObject); } }
}/*________Disparar_________*/ // Audio Disparar matar void Wwise_DispararM() { if (DispararM != null) { DispararM.HandleEvent(gameObject); } }
void Wwise_ImpactoBala() { if (ImpactoBala != null) { ImpactoBala.HandleEvent(gameObject); } }
void Wwise_Pasos() { if (Pasos != null) { Pasos.HandleEvent(gameObject); } }
public void play_Seleccionar() { if (audioSeleccionar != null) { audioSeleccionar.HandleEvent(gameObject); } }
void Wwise_Billie() { if (Billie != null) { Billie.HandleEvent(gameObject); } }
void Wwise_AtaqueH() { if (AtaqueH != null) { AtaqueH.HandleEvent(gameObject); } }
void Wwise_MuerteC() { if (MuerteC != null) { MuerteC.HandleEvent(gameObject); } }
void Wwise_CuracionH() { if (CuracionH != null) { CuracionH.HandleEvent(gameObject); } }
void Wwise_CuracionC() { if (CuracionC != null) { CuracionC.HandleEvent(gameObject); } }
void Wwise_AtaqueP() { if (AtaqueP != null) { AtaqueP.HandleEvent(gameObject); } }
void Wwise_AtaqueC() { if (AtaqueC != null) { AtaqueC.HandleEvent(gameObject); } }
// Audio Disparar Curar void Wwise_DispararC() { if (DispararC != null) { DispararC.HandleEvent(gameObject); } }
void Wwise_DañoLeslie() { if (DañoLeslie != null) { DañoLeslie.HandleEvent(gameObject); } }
public void OnCollisionEnter2D(Collision2D other) { if (other.gameObject.name == "PlayerGO") { GameManager.instance.MoodDamaged(1); thePlayerSprite.color = new Color(1, 0, 0, 1); damageCounter = timeDamaged; GameManager.instance.arrowDownUI.SetActive(true); StartCoroutine(TurningOFFArrow()); //Codigo para reproducir Audio de Claxon if (eventoClaxon != null) { eventoClaxon.HandleEvent(gameObject); } } }
public void Activate(string effectName, Transform target) { Transform currentEffect = m_effectsList[effectName]; if (effectName == "Grab") { currentEffect.SetParent(target, true); } currentEffect.position = target.position; currentEffect.GetComponent <ParticleSystem>().Play(); AkEvent wwiseEvent = currentEffect.GetComponent <AkEvent>(); if (wwiseEvent) { wwiseEvent.HandleEvent(currentEffect.gameObject); } }
public void PlayUIAudio(string name) { AkSoundEngine.SetSwitch("UIAudioSwitch", name, uiAudioEvent.gameObject); uiAudioEvent.HandleEvent(uiAudioEvent.gameObject); }
public virtual void PlayAudio(string name, string swtich) { AkSoundEngine.SetSwitch(name, swtich, soundObj); sound.HandleEvent(soundObj); }
/// <summary> /// (Called by KinematicCharacterMotor during its update cycle) /// This is where you tell your character what its velocity should be right now. /// This is the ONLY place where you can set the character's velocity /// </summary> public void UpdateVelocity(ref Vector3 currentVelocity, float deltaTime) { switch (CurrentCharacterState) { case CharacterState.Default: { // Ground movement if (Motor.GroundingStatus.IsStableOnGround) { float currentVelocityMagnitude = currentVelocity.magnitude; Vector3 effectiveGroundNormal = Motor.GroundingStatus.GroundNormal; if (currentVelocityMagnitude > 0f && Motor.GroundingStatus.SnappingPrevented) { // Take the normal from where we're coming from Vector3 groundPointToCharacter = Motor.TransientPosition - Motor.GroundingStatus.GroundPoint; if (Vector3.Dot(currentVelocity, groundPointToCharacter) >= 0f) { effectiveGroundNormal = Motor.GroundingStatus.OuterGroundNormal; } else { effectiveGroundNormal = Motor.GroundingStatus.InnerGroundNormal; } } // Reorient velocity on slope currentVelocity = Motor.GetDirectionTangentToSurface(currentVelocity, effectiveGroundNormal) * currentVelocityMagnitude; // Calculate target velocity Vector3 inputRight = Vector3.Cross(_moveInputVector, Motor.CharacterUp); Vector3 reorientedInput = Vector3.Cross(effectiveGroundNormal, inputRight).normalized *_moveInputVector.magnitude; Vector3 targetMovementVelocity = reorientedInput * MaxStableMoveSpeed; // Smooth movement Velocity currentVelocity = Vector3.Lerp(currentVelocity, targetMovementVelocity, 1f - Mathf.Exp(-StableMovementSharpness * deltaTime)); float dist = Vector3.Distance(currentVelocity, Vector3.zero); if (dist > MinAudibleSpeed && FootstepSound != null) { FootstepSound.HandleEvent(gameObject); } } // Air movement else { // Add move input if (_moveInputVector.sqrMagnitude > 0f) { Vector3 addedVelocity = _moveInputVector * AirAccelerationSpeed * deltaTime; Vector3 currentVelocityOnInputsPlane = Vector3.ProjectOnPlane(currentVelocity, Motor.CharacterUp); // Limit air velocity from inputs if (currentVelocityOnInputsPlane.magnitude < MaxAirMoveSpeed) { // clamp addedVel to make total vel not exceed max vel on inputs plane Vector3 newTotal = Vector3.ClampMagnitude(currentVelocityOnInputsPlane + addedVelocity, MaxAirMoveSpeed); addedVelocity = newTotal - currentVelocityOnInputsPlane; } else { // Make sure added vel doesn't go in the direction of the already-exceeding velocity if (Vector3.Dot(currentVelocityOnInputsPlane, addedVelocity) > 0f) { addedVelocity = Vector3.ProjectOnPlane(addedVelocity, currentVelocityOnInputsPlane.normalized); } } // Prevent air-climbing sloped walls if (Motor.GroundingStatus.FoundAnyGround) { if (Vector3.Dot(currentVelocity + addedVelocity, addedVelocity) > 0f) { Vector3 perpenticularObstructionNormal = Vector3.Cross(Vector3.Cross(Motor.CharacterUp, Motor.GroundingStatus.GroundNormal), Motor.CharacterUp).normalized; addedVelocity = Vector3.ProjectOnPlane(addedVelocity, perpenticularObstructionNormal); } } // Apply added velocity currentVelocity += addedVelocity; } // Gravity currentVelocity += Gravity * deltaTime; // Drag currentVelocity *= (1f / (1f + (Drag * deltaTime))); } // Handle jumping _jumpedThisFrame = false; _timeSinceJumpRequested += deltaTime; if (_jumpRequested) { // See if we actually are allowed to jump if (!_jumpConsumed && ((AllowJumpingWhenSliding ? Motor.GroundingStatus.FoundAnyGround : Motor.GroundingStatus.IsStableOnGround) || _timeSinceLastAbleToJump <= JumpPostGroundingGraceTime)) { // Calculate jump direction before ungrounding Vector3 jumpDirection = Motor.CharacterUp; if (Motor.GroundingStatus.FoundAnyGround && !Motor.GroundingStatus.IsStableOnGround) { jumpDirection = Motor.GroundingStatus.GroundNormal; } // Makes the character skip ground probing/snapping on its next update. // If this line weren't here, the character would remain snapped to the ground when trying to jump. Try commenting this line out and see. Motor.ForceUnground(); // Add to the return velocity and reset jump state currentVelocity += (jumpDirection * JumpUpSpeed) - Vector3.Project(currentVelocity, Motor.CharacterUp); currentVelocity += (_moveInputVector * JumpScalableForwardSpeed); _jumpRequested = false; _jumpConsumed = true; _jumpedThisFrame = true; if (JumpSound != null) { JumpSound.HandleEvent(gameObject); } } } // Take into account additive velocity if (_internalVelocityAdd.sqrMagnitude > 0f) { currentVelocity += _internalVelocityAdd; _internalVelocityAdd = Vector3.zero; } break; } } }