1
This commit is contained in:
@@ -1,28 +0,0 @@
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine;
|
||||
using BITKit.Sensors;
|
||||
namespace BITKit.Entities
|
||||
{
|
||||
public class EntityAudioObject : EntityBehavior, IAudioObject
|
||||
{
|
||||
float volume;
|
||||
public override void OnStart()
|
||||
{
|
||||
UnityEntity.AddListener<AudioSO>(OnAuioSO);
|
||||
}
|
||||
public override void OnFixedUpdate(float deltaTime)
|
||||
{
|
||||
volume = Mathf.Lerp(volume, 0, deltaTime);
|
||||
}
|
||||
public float GetVolume()
|
||||
{
|
||||
return volume;
|
||||
}
|
||||
void OnAuioSO(AudioSO so)
|
||||
{
|
||||
if (so.distance > volume)
|
||||
volume = so.distance;
|
||||
}
|
||||
}
|
||||
}
|
@@ -1,11 +0,0 @@
|
||||
fileFormatVersion: 2
|
||||
guid: d6c28a6107497be44bfecb5e31b960c5
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
Reference in New Issue
Block a user