Skip to content

Commit

Permalink
Added some very preliminary flying skuas, and corrected a bunch of so…
Browse files Browse the repository at this point in the history
…cketing issues with Margo.
  • Loading branch information
rdtredinnick committed Dec 12, 2024
1 parent 068bb94 commit f661857
Show file tree
Hide file tree
Showing 15 changed files with 736 additions and 168 deletions.
15 changes: 9 additions & 6 deletions Assets/Code/Environment/AmbientSkua.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,10 @@
using System.Collections;
using System.Collections.Generic;
using FieldDay;
using FieldDay.Audio;
using FieldDay.Components;
using UnityEngine;
using BeauUtil;

using Random = UnityEngine.Random;

Expand All @@ -24,11 +26,11 @@ public class AmbientSkua : BatchedComponent//, ISlapInteract
bool _flier = false;

[SerializeField]
AudioSource _sounds;
Transform AudioLocation;

[AudioEventRef]
public StringHash32 MoveSound;

//[SerializeField]
//SFXAsset _hitSound;

Vector3 _startingPosition;

private SkuaState _currentState;
Expand All @@ -39,8 +41,7 @@ private enum SkuaState : byte {
Moving
}

// Start is called before the first frame update
void Start()
void Awake()
{
_startingPosition = transform.position;
StartCoroutine(StartIdle(NewIdleTime()));
Expand Down Expand Up @@ -123,6 +124,8 @@ Vector3 FindNewLocation()
}
newLoc.x += Random.Range(-_wanderRadius, _wanderRadius);
newLoc.z += Random.Range(-_wanderRadius, _wanderRadius);

Sfx.Play(MoveSound, AudioLocation);

return newLoc;
}
Expand Down
Loading

0 comments on commit f661857

Please sign in to comment.