brush texture to material mapping and material changes
This commit is contained in:
@@ -31,6 +31,8 @@ namespace Game
|
||||
[Limit(0, 9000), Tooltip("Base Movement speed")]
|
||||
public float MoveSpeed { get; set; } = 320;
|
||||
|
||||
public AudioClip JumpLandSound;
|
||||
|
||||
private float viewPitch;
|
||||
private float viewYaw;
|
||||
private float viewRoll;
|
||||
@@ -40,7 +42,7 @@ namespace Game
|
||||
private const float collisionMargin = 0.031f * 1.666f;
|
||||
private const float slopeNormal = 0.7f;
|
||||
|
||||
Actor rootActor;
|
||||
private Actor rootActor;
|
||||
private RigidBody rigidBody;
|
||||
|
||||
public override void OnAwake()
|
||||
@@ -584,22 +586,17 @@ namespace Game
|
||||
velocity += Vector3.Up * jumpVelocity;
|
||||
onGround = false;
|
||||
|
||||
Guid jumpguid;
|
||||
FlaxEngine.Json.JsonSerializer.ParseID("1ef4565844a4b36cdfda54b51f338c77", out jumpguid);
|
||||
AudioClip jumpAsset = AudioClip.Find<AudioClip>(ref jumpguid);
|
||||
if (jumpAsset != null && jumpAsset.IsLoaded)
|
||||
if (JumpLandSound != null && JumpLandSound.IsLoaded)
|
||||
{
|
||||
var audioSource = new AudioSource();
|
||||
audioSource.Clip = jumpAsset;
|
||||
audioSource.Clip = JumpLandSound;
|
||||
audioSource.Position = rootActor.Position; //new Vector3(-350, 176, 61);//rootActor.Position;
|
||||
audioSource.Parent = Actor.Parent;
|
||||
|
||||
|
||||
audioSource.Play();
|
||||
Destroy(audioSource, jumpAsset.Length);
|
||||
Console.Print("jumping sound!");
|
||||
Destroy(audioSource, JumpLandSound.Length);
|
||||
}
|
||||
else if (jumpAsset == null)
|
||||
else if (JumpLandSound == null)
|
||||
Console.Print("jumpAsset not found");
|
||||
else
|
||||
Console.Print("jumpAsset not loaded");
|
||||
|
||||
Reference in New Issue
Block a user