Initial Wwise Integration
Created wwise project Integrated inventory UI sounds Improved projectile weapon behavior (randomized start position, stopped them from self-destructing at target range when airburst is disabled)
This commit is contained in:
parent
b53e4aec8c
commit
db8c3c7779
1019 changed files with 76372 additions and 110 deletions
|
|
@ -15,7 +15,6 @@ public class Projectile : MonoBehaviour
|
|||
|
||||
public float AirburstDistance;
|
||||
public float AirburstRange;
|
||||
public float AirburstVelocity;
|
||||
public float DirectHitDamageMultiplier = 1;
|
||||
|
||||
private bool _alive;
|
||||
|
|
@ -87,7 +86,7 @@ public class Projectile : MonoBehaviour
|
|||
var distanceTraveled = (transform.position - StartPosition).magnitude;
|
||||
if(distanceTraveled > Range)
|
||||
StartCoroutine(Kill());
|
||||
if (AirburstDistance > 1 && distanceTraveled > AirburstDistance)
|
||||
if (AirburstRange > 1 && distanceTraveled > AirburstDistance)
|
||||
{
|
||||
StartCoroutine(Kill());
|
||||
var ht = HitEffect.Instantiate<Transform>();
|
||||
|
|
|
|||
|
|
@ -17,13 +17,13 @@ public class ProjectileManager : InstantWeaponEffectManager
|
|||
var barrel = source.GetBarrel(hp);
|
||||
var angle = weapon.Spread / 2;
|
||||
p.SourceEntity = source.Entity;
|
||||
p.StartPosition = p.transform.position = barrel.position;
|
||||
p.Velocity = Quaternion.Euler(
|
||||
Random.Range(-angle, angle),
|
||||
Random.Range(-angle, angle),
|
||||
Random.Range(-angle, angle)) *
|
||||
barrel.forward *
|
||||
weapon.Velocity;
|
||||
p.StartPosition = p.transform.position = barrel.position + p.Velocity * (Random.value * Time.deltaTime);
|
||||
if(InheritVelocity)
|
||||
p.Velocity += new Vector3(source.Entity.Velocity.x, 0, source.Entity.Velocity.y);
|
||||
p.Damage = weapon.Damage;
|
||||
|
|
|
|||
Loading…
Reference in a new issue