mirror of
https://projects.caleb-brown.dev/UDRI-XRT/UDRIGEEKCup2024.git
synced 2025-01-22 07:08:51 -05:00
Added sounds and increased hit power
This commit is contained in:
parent
e36570f22c
commit
88c7366379
@ -2,7 +2,7 @@ using System.Collections;
|
|||||||
using UnityAtoms.BaseAtoms;
|
using UnityAtoms.BaseAtoms;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GolfControls
|
namespace MAVRIC.GEEKCup.GolfControls
|
||||||
{
|
{
|
||||||
public class BallHitController : MonoBehaviour
|
public class BallHitController : MonoBehaviour
|
||||||
{
|
{
|
||||||
@ -18,6 +18,10 @@ namespace GolfControls
|
|||||||
|
|
||||||
private Rigidbody body;
|
private Rigidbody body;
|
||||||
|
|
||||||
|
public AudioSource hitSoundSource;
|
||||||
|
|
||||||
|
private float minVelocityMagnitude = 0.1f;
|
||||||
|
|
||||||
private void Start()
|
private void Start()
|
||||||
{
|
{
|
||||||
body = gameObject.GetComponent<Rigidbody>();
|
body = gameObject.GetComponent<Rigidbody>();
|
||||||
@ -36,7 +40,9 @@ namespace GolfControls
|
|||||||
private void OnHit()
|
private void OnHit()
|
||||||
{
|
{
|
||||||
if(isMovingVariable.Value) return;
|
if(isMovingVariable.Value) return;
|
||||||
|
if (body.velocity.magnitude >= minVelocityMagnitude) return;
|
||||||
|
|
||||||
|
hitSoundSource.Play();
|
||||||
Vector3 hitVector = AngleVariable.Value.normalized * (PowerVariable.Value * baseForce);
|
Vector3 hitVector = AngleVariable.Value.normalized * (PowerVariable.Value * baseForce);
|
||||||
body.AddForce(hitVector);
|
body.AddForce(hitVector);
|
||||||
StartCoroutine(TrackState());
|
StartCoroutine(TrackState());
|
||||||
@ -45,7 +51,6 @@ namespace GolfControls
|
|||||||
|
|
||||||
private IEnumerator TrackState()
|
private IEnumerator TrackState()
|
||||||
{
|
{
|
||||||
float minVelocityMagnitude = 0.1f;
|
|
||||||
float ballStopTime = 1.0f;
|
float ballStopTime = 1.0f;
|
||||||
|
|
||||||
isMovingVariable.SetValue(true);
|
isMovingVariable.SetValue(true);
|
||||||
|
@ -1,12 +1,29 @@
|
|||||||
|
using System;
|
||||||
using UnityAtoms.BaseAtoms;
|
using UnityAtoms.BaseAtoms;
|
||||||
using UnityEngine;
|
using UnityEngine;
|
||||||
|
|
||||||
namespace GolfControls
|
namespace MAVRIC.GEEKCup.GolfControls
|
||||||
{
|
{
|
||||||
public class StrokeCounter : MonoBehaviour
|
public class StrokeCounter : MonoBehaviour
|
||||||
{
|
{
|
||||||
public IntVariable StrokeVariable;
|
public IntVariable StrokeVariable;
|
||||||
|
|
||||||
|
public BoolEvent IsIncrementedEvent;
|
||||||
|
public int ParStrokeCount = 5;
|
||||||
|
|
||||||
|
public VoidEvent LossEvent;
|
||||||
|
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
IsIncrementedEvent.Register(OnStrokeCountIncremented);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void OnDisable()
|
||||||
|
{
|
||||||
|
IsIncrementedEvent.Unregister(OnStrokeCountIncremented);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
public void OnHit(bool isHit)
|
public void OnHit(bool isHit)
|
||||||
{
|
{
|
||||||
if (!isHit)
|
if (!isHit)
|
||||||
@ -16,5 +33,16 @@ namespace GolfControls
|
|||||||
|
|
||||||
StrokeVariable.SetValue(StrokeVariable.Value + 1);
|
StrokeVariable.SetValue(StrokeVariable.Value + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void OnStrokeCountIncremented(bool ballStartedHit)
|
||||||
|
{
|
||||||
|
if (ballStartedHit) return;
|
||||||
|
|
||||||
|
if (StrokeVariable.Value >= ParStrokeCount)
|
||||||
|
{
|
||||||
|
LossEvent.Raise();
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
16
Assets/ParStrokeCountReached.asset
Normal file
16
Assets/ParStrokeCountReached.asset
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
%YAML 1.1
|
||||||
|
%TAG !u! tag:unity3d.com,2011:
|
||||||
|
--- !u!114 &11400000
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 0}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 04d35e2eb934747da9d77a3af62bb8ca, type: 3}
|
||||||
|
m_Name: ParStrokeCountReached
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_developerDescription:
|
||||||
|
_replayBufferSize: 1
|
8
Assets/ParStrokeCountReached.asset.meta
Normal file
8
Assets/ParStrokeCountReached.asset.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 6d75584e89af7e6488027b09813f11e6
|
||||||
|
NativeFormatImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
mainObjectFileID: 11400000
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
@ -34,6 +34,7 @@ Transform:
|
|||||||
- {fileID: 7529011191634243865}
|
- {fileID: 7529011191634243865}
|
||||||
- {fileID: 2969644529280671742}
|
- {fileID: 2969644529280671742}
|
||||||
- {fileID: 3631394724762200096}
|
- {fileID: 3631394724762200096}
|
||||||
|
- {fileID: 2734812901335878935}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
--- !u!114 &3021524037178137395
|
--- !u!114 &3021524037178137395
|
||||||
@ -82,6 +83,175 @@ Transform:
|
|||||||
m_Children: []
|
m_Children: []
|
||||||
m_Father: {fileID: 1575695703629199926}
|
m_Father: {fileID: 1575695703629199926}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!1 &6950397858787610770
|
||||||
|
GameObject:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
serializedVersion: 6
|
||||||
|
m_Component:
|
||||||
|
- component: {fileID: 2734812901335878935}
|
||||||
|
- component: {fileID: 4860048457319323441}
|
||||||
|
- component: {fileID: 6337772897861031450}
|
||||||
|
m_Layer: 0
|
||||||
|
m_Name: ParEvent
|
||||||
|
m_TagString: Untagged
|
||||||
|
m_Icon: {fileID: 0}
|
||||||
|
m_NavMeshLayer: 0
|
||||||
|
m_StaticEditorFlags: 0
|
||||||
|
m_IsActive: 1
|
||||||
|
--- !u!4 &2734812901335878935
|
||||||
|
Transform:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6950397858787610770}
|
||||||
|
serializedVersion: 2
|
||||||
|
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||||
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
|
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||||
|
m_ConstrainProportionsScale: 0
|
||||||
|
m_Children: []
|
||||||
|
m_Father: {fileID: 1575695703629199926}
|
||||||
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!82 &4860048457319323441
|
||||||
|
AudioSource:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6950397858787610770}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 4
|
||||||
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
|
m_audioClip: {fileID: 8300000, guid: 454f6ff3e51d5fd44ab84bb27b326036, type: 3}
|
||||||
|
m_PlayOnAwake: 0
|
||||||
|
m_Volume: 0.7
|
||||||
|
m_Pitch: 1
|
||||||
|
Loop: 0
|
||||||
|
Mute: 0
|
||||||
|
Spatialize: 0
|
||||||
|
SpatializePostEffects: 0
|
||||||
|
Priority: 128
|
||||||
|
DopplerLevel: 1
|
||||||
|
MinDistance: 1
|
||||||
|
MaxDistance: 500
|
||||||
|
Pan2D: 0
|
||||||
|
rolloffMode: 0
|
||||||
|
BypassEffects: 0
|
||||||
|
BypassListenerEffects: 0
|
||||||
|
BypassReverbZones: 0
|
||||||
|
rolloffCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
panLevelCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
spreadCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
reverbZoneMixCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
--- !u!114 &6337772897861031450
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6950397858787610770}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: d2458933140c54c9db0aec7a69c1b617, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
_developerDescription:
|
||||||
|
_unityEventResponse:
|
||||||
|
m_PersistentCalls:
|
||||||
|
m_Calls:
|
||||||
|
- m_Target: {fileID: 4860048457319323441}
|
||||||
|
m_TargetAssemblyTypeName: UnityEngine.AudioSource, UnityEngine
|
||||||
|
m_MethodName: Play
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
|
_actionResponses: []
|
||||||
|
_conditions: []
|
||||||
|
_operator: 0
|
||||||
|
_replayEventBufferOnRegister: 1
|
||||||
|
_eventReference:
|
||||||
|
_usage: 0
|
||||||
|
_event: {fileID: 11400000, guid: 6d75584e89af7e6488027b09813f11e6, type: 2}
|
||||||
|
_eventInstancer: {fileID: 0}
|
||||||
|
_collection: {fileID: 0}
|
||||||
|
_list: {fileID: 0}
|
||||||
|
_collectionInstancer: {fileID: 0}
|
||||||
|
_listInstancer: {fileID: 0}
|
||||||
--- !u!1001 &2420978955236610172
|
--- !u!1001 &2420978955236610172
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -63,9 +63,10 @@ MonoBehaviour:
|
|||||||
m_Script: {fileID: 11500000, guid: 594dbcb0ac6fee442ac8e47c96781542, type: 3}
|
m_Script: {fileID: 11500000, guid: 594dbcb0ac6fee442ac8e47c96781542, type: 3}
|
||||||
m_Name:
|
m_Name:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
ballMovingVariable: {fileID: 11400000, guid: 838a13f5fd312c94398e49cfc36e34ad, type: 2}
|
|
||||||
StrokeVariable: {fileID: 11400000, guid: b17566f4d19813249a993793ac86d94c, type: 2}
|
StrokeVariable: {fileID: 11400000, guid: b17566f4d19813249a993793ac86d94c, type: 2}
|
||||||
HitEvent: {fileID: 11400000, guid: 90fa28c269919df41acdd37835ee3b9e, type: 2}
|
IsIncrementedEvent: {fileID: 11400000, guid: ec7d602226c7a4b4a9aeacaba953fc38, type: 2}
|
||||||
|
ParStrokeCount: 5
|
||||||
|
LossEvent: {fileID: 11400000, guid: 6d75584e89af7e6488027b09813f11e6, type: 2}
|
||||||
--- !u!114 &1229042045006618261
|
--- !u!114 &1229042045006618261
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -82,6 +82,18 @@ MonoBehaviour:
|
|||||||
m_StringArgument:
|
m_StringArgument:
|
||||||
m_BoolArgument: 0
|
m_BoolArgument: 0
|
||||||
m_CallState: 2
|
m_CallState: 2
|
||||||
|
- m_Target: {fileID: 1969549356574266556}
|
||||||
|
m_TargetAssemblyTypeName: UnityEngine.AudioSource, UnityEngine
|
||||||
|
m_MethodName: Play
|
||||||
|
m_Mode: 1
|
||||||
|
m_Arguments:
|
||||||
|
m_ObjectArgument: {fileID: 0}
|
||||||
|
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
|
||||||
|
m_IntArgument: 0
|
||||||
|
m_FloatArgument: 0
|
||||||
|
m_StringArgument:
|
||||||
|
m_BoolArgument: 0
|
||||||
|
m_CallState: 2
|
||||||
layerMask:
|
layerMask:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_Bits: 1
|
m_Bits: 1
|
||||||
@ -165,6 +177,7 @@ GameObject:
|
|||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 8649987843805268783}
|
- component: {fileID: 8649987843805268783}
|
||||||
|
- component: {fileID: 1969549356574266556}
|
||||||
m_Layer: 7
|
m_Layer: 7
|
||||||
m_Name: Hole
|
m_Name: Hole
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
@ -192,6 +205,102 @@ Transform:
|
|||||||
- {fileID: 5490686123428067723}
|
- {fileID: 5490686123428067723}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!82 &1969549356574266556
|
||||||
|
AudioSource:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 6121683813469744371}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 4
|
||||||
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
|
m_audioClip: {fileID: 8300000, guid: 8db469e270c7311428e074fc0d1000c1, type: 3}
|
||||||
|
m_PlayOnAwake: 0
|
||||||
|
m_Volume: 0.8
|
||||||
|
m_Pitch: 1
|
||||||
|
Loop: 0
|
||||||
|
Mute: 0
|
||||||
|
Spatialize: 0
|
||||||
|
SpatializePostEffects: 0
|
||||||
|
Priority: 128
|
||||||
|
DopplerLevel: 1
|
||||||
|
MinDistance: 1
|
||||||
|
MaxDistance: 500
|
||||||
|
Pan2D: 0
|
||||||
|
rolloffMode: 0
|
||||||
|
BypassEffects: 0
|
||||||
|
BypassListenerEffects: 0
|
||||||
|
BypassReverbZones: 0
|
||||||
|
rolloffCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
panLevelCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
spreadCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
reverbZoneMixCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
--- !u!1 &6783148664893773472
|
--- !u!1 &6783148664893773472
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
@ -17,6 +17,7 @@ GameObject:
|
|||||||
- component: {fileID: 2848465825052700219}
|
- component: {fileID: 2848465825052700219}
|
||||||
- component: {fileID: 3220627860812539771}
|
- component: {fileID: 3220627860812539771}
|
||||||
- component: {fileID: 3638049900979181177}
|
- component: {fileID: 3638049900979181177}
|
||||||
|
- component: {fileID: 1555587377596854050}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: TestGolfBall
|
m_Name: TestGolfBall
|
||||||
m_TagString: Player
|
m_TagString: Player
|
||||||
@ -171,7 +172,8 @@ MonoBehaviour:
|
|||||||
PowerVariable: {fileID: 11400000, guid: b5aa4452d8d082d48b46495c7352e39e, type: 2}
|
PowerVariable: {fileID: 11400000, guid: b5aa4452d8d082d48b46495c7352e39e, type: 2}
|
||||||
isMovingVariable: {fileID: 11400000, guid: 838a13f5fd312c94398e49cfc36e34ad, type: 2}
|
isMovingVariable: {fileID: 11400000, guid: 838a13f5fd312c94398e49cfc36e34ad, type: 2}
|
||||||
inHoleVariable: {fileID: 11400000, guid: 3b0e06d0a76bceb4296c54d02f0d34a4, type: 2}
|
inHoleVariable: {fileID: 11400000, guid: 3b0e06d0a76bceb4296c54d02f0d34a4, type: 2}
|
||||||
baseForce: 200
|
baseForce: 400
|
||||||
|
hitSoundSource: {fileID: 1555587377596854050}
|
||||||
--- !u!114 &3220627860812539771
|
--- !u!114 &3220627860812539771
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -199,3 +201,99 @@ MonoBehaviour:
|
|||||||
_tags:
|
_tags:
|
||||||
- {fileID: 11400000, guid: 1f557d488f8464000b778362139a0045, type: 2}
|
- {fileID: 11400000, guid: 1f557d488f8464000b778362139a0045, type: 2}
|
||||||
- {fileID: 0}
|
- {fileID: 0}
|
||||||
|
--- !u!82 &1555587377596854050
|
||||||
|
AudioSource:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 550417892748896529}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 4
|
||||||
|
OutputAudioMixerGroup: {fileID: 0}
|
||||||
|
m_audioClip: {fileID: 8300000, guid: b76a30d1b47d7094aac2c87dbbe93da2, type: 3}
|
||||||
|
m_PlayOnAwake: 0
|
||||||
|
m_Volume: 1
|
||||||
|
m_Pitch: 1
|
||||||
|
Loop: 0
|
||||||
|
Mute: 0
|
||||||
|
Spatialize: 0
|
||||||
|
SpatializePostEffects: 0
|
||||||
|
Priority: 128
|
||||||
|
DopplerLevel: 1
|
||||||
|
MinDistance: 1
|
||||||
|
MaxDistance: 500
|
||||||
|
Pan2D: 0
|
||||||
|
rolloffMode: 0
|
||||||
|
BypassEffects: 0
|
||||||
|
BypassListenerEffects: 0
|
||||||
|
BypassReverbZones: 0
|
||||||
|
rolloffCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 1
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
panLevelCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
spreadCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 0
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
reverbZoneMixCustomCurve:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Curve:
|
||||||
|
- serializedVersion: 3
|
||||||
|
time: 0
|
||||||
|
value: 1
|
||||||
|
inSlope: 0
|
||||||
|
outSlope: 0
|
||||||
|
tangentMode: 0
|
||||||
|
weightedMode: 0
|
||||||
|
inWeight: 0.33333334
|
||||||
|
outWeight: 0.33333334
|
||||||
|
m_PreInfinity: 2
|
||||||
|
m_PostInfinity: 2
|
||||||
|
m_RotationOrder: 4
|
||||||
|
@ -15,7 +15,7 @@ namespace MAVRIC.GEEKCup
|
|||||||
[SerializeField] private UnityEvent<bool> onTrigger;
|
[SerializeField] private UnityEvent<bool> onTrigger;
|
||||||
|
|
||||||
[SerializeField] private LayerMask layerMask = 1 >> 0;
|
[SerializeField] private LayerMask layerMask = 1 >> 0;
|
||||||
[SerializeField] private List<StringConstant> tagsMask = new ();
|
[SerializeField] private List<StringConstant> tagsMask = new List<StringConstant>();
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other)
|
private void OnTriggerEnter(Collider other)
|
||||||
{
|
{
|
||||||
|
8
Assets/Sounds.meta
Normal file
8
Assets/Sounds.meta
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 971eae2805eb624438c84cf77a3ebfab
|
||||||
|
folderAsset: yes
|
||||||
|
DefaultImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/Sounds/downer_noise.mp3
(Stored with Git LFS)
Normal file
BIN
Assets/Sounds/downer_noise.mp3
(Stored with Git LFS)
Normal file
Binary file not shown.
23
Assets/Sounds/downer_noise.mp3.meta
Normal file
23
Assets/Sounds/downer_noise.mp3.meta
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 454f6ff3e51d5fd44ab84bb27b326036
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 7
|
||||||
|
defaultSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
preloadAudioData: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/Sounds/mixkit-fantasy-game-success-notification-270.wav
(Stored with Git LFS)
Normal file
BIN
Assets/Sounds/mixkit-fantasy-game-success-notification-270.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
@ -0,0 +1,23 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 8db469e270c7311428e074fc0d1000c1
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 7
|
||||||
|
defaultSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
preloadAudioData: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
BIN
Assets/Sounds/mixkit-powerful-golf-shot-2126.wav
(Stored with Git LFS)
Normal file
BIN
Assets/Sounds/mixkit-powerful-golf-shot-2126.wav
(Stored with Git LFS)
Normal file
Binary file not shown.
23
Assets/Sounds/mixkit-powerful-golf-shot-2126.wav.meta
Normal file
23
Assets/Sounds/mixkit-powerful-golf-shot-2126.wav.meta
Normal file
@ -0,0 +1,23 @@
|
|||||||
|
fileFormatVersion: 2
|
||||||
|
guid: b76a30d1b47d7094aac2c87dbbe93da2
|
||||||
|
AudioImporter:
|
||||||
|
externalObjects: {}
|
||||||
|
serializedVersion: 7
|
||||||
|
defaultSettings:
|
||||||
|
serializedVersion: 2
|
||||||
|
loadType: 0
|
||||||
|
sampleRateSetting: 0
|
||||||
|
sampleRateOverride: 44100
|
||||||
|
compressionFormat: 1
|
||||||
|
quality: 1
|
||||||
|
conversionMode: 0
|
||||||
|
preloadAudioData: 0
|
||||||
|
platformSettingOverrides: {}
|
||||||
|
forceToMono: 0
|
||||||
|
normalize: 1
|
||||||
|
loadInBackground: 0
|
||||||
|
ambisonic: 0
|
||||||
|
3D: 1
|
||||||
|
userData:
|
||||||
|
assetBundleName:
|
||||||
|
assetBundleVariant:
|
Loading…
Reference in New Issue
Block a user