1
0
mirror of https://projects.caleb-brown.dev/UDRI-XRT/UDRIGEEKCup2024.git synced 2025-01-22 07:08:51 -05:00

Refactored code to split up responsibilities

This commit is contained in:
Abraham 2024-04-15 21:45:10 -04:00
parent 6898d9e1a8
commit 5f918e6879
51 changed files with 1568 additions and 288 deletions

View File

@ -0,0 +1,36 @@
using System;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls
{
public class AngleCalculator : MonoBehaviour
{
public Vector3Variable directionVariable;
public FloatVariable angleVariable;
public Transform targetTransform;
private void Update()
{
Vector3 myPos = transform.position;
Vector3 targetPos = targetTransform.position;
Vector3 angleVector = Vector3.ProjectOnPlane(myPos - targetPos,Vector3.down);
directionVariable.SetValue(angleVector);
double angle = getAngle(Vector2.zero, new Vector2(angleVector.z, angleVector.x));
float adjustedAngle = (float) angle + 180.0f;
angleVariable.SetValue(adjustedAngle);
double getAngle(Vector2 me, Vector2 target) {
return Math.Atan2(target.y - me.y, target.x - me.x) * (180/Math.PI);
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 81288180c711998469ce58b134a7aa18
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,88 @@
using System;
using System.Collections;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls
{
public class BallHitController : MonoBehaviour
{
public VoidEvent ballHitEvent;
public Vector3Variable AngleVariable;
public FloatVariable PowerVariable;
public BoolVariable isMovingVariable;
public BoolVariable inHoleVariable;
public float baseForce;
private Rigidbody body;
private void Start()
{
body = gameObject.GetComponent<Rigidbody>();
}
private void OnEnable()
{
ballHitEvent.Register(OnHit);
}
private void OnDisable()
{
ballHitEvent.Unregister(OnHit);
}
private void OnHit()
{
if(isMovingVariable.Value) return;
Vector3 hitVector = AngleVariable.Value.normalized * (PowerVariable.Value * baseForce);
body.AddForce(hitVector);
StartCoroutine(TrackState());
}
private IEnumerator TrackState()
{
float minVelocityMagnitude = 0.1f;
float ballStopTime = 1.0f;
isMovingVariable.SetValue(true);
while (!inHoleVariable.Value)
{
yield return null;
if(body.velocity.magnitude >= minVelocityMagnitude) continue;
float timer = 0.0f;
bool isStopped = true;
while (timer < ballStopTime)
{
yield return null;
if (inHoleVariable.Value) break;
timer += Time.deltaTime;
if (body.velocity.magnitude > minVelocityMagnitude)
{
isStopped = false;
break;
}
}
if (isStopped) break;
}
body.velocity = Vector3.zero;
body.angularVelocity = Vector3.zero;
isMovingVariable.SetValue(false);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: cd75af7762b9bcb46978ba8c4372c233
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,12 +1,13 @@
using System;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls
{
public class Goal : MonoBehaviour
{
public delegate void basicDelegate();
public static basicDelegate GoalHit;
public BoolVariable hitVariable;
public MeshRenderer myMeshRenderer;
@ -15,7 +16,7 @@ namespace GolfControls
public void OnTriggerEnter(Collider other)
{
myMeshRenderer.material = Material;
GoalHit?.Invoke();
hitVariable.SetValue(true);
}
}
}

View File

@ -7,27 +7,15 @@ namespace GolfControls
public class GolfControl : MonoBehaviour
{
public delegate void vector3Delegate(Vector3 vector);
public delegate void floatDelegate(float value);
public delegate void intDelegate(int value);
public static floatDelegate PowerPercentUpdated;
public static floatDelegate HitPowerDecided;
public static vector3Delegate ForceDirectionUpdated;
public static vector3Delegate BallPositionUpdated;
public static vector3Delegate BallStoppedAtPosition;
public static intDelegate strokeCountUpdated;
float outputPercent = 0.0f;
private bool ballIsMoving;
[SerializeField] private float timeToMaxPower = 1.0f;
[SerializeField] private float timeToMinPower = 1.0f;
[SerializeField] private float pauseTimeAtEnds = 0.05f;
[SerializeField] private Transform forceDirectionTransform;
[SerializeField] private Rigidbody ballBody;
[SerializeField] private float baseForce = 1.0f;
private Vector3 hitAngle = Vector3.zero;
private int strokeCount;
@ -35,114 +23,10 @@ namespace GolfControls
private void Start()
{
StartCoroutine(UpdateHitAngle());
strokeCount = 1;
strokeCountUpdated?.Invoke(strokeCount);
StartCoroutine(SlidePower());
}
private void OnEnable()
{
Goal.GoalHit += OnGoalHit;
}
private void OnDisable()
{
Goal.GoalHit -= OnGoalHit;
}
private void OnGoalHit()
{
ballBody.velocity = Vector3.zero;
inGoal = true;
}
public void HitBall()
{
if (ballIsMoving) return;
PowerPercentUpdated?.Invoke(outputPercent);
HitPowerDecided?.Invoke(outputPercent);
Vector3 hitVector = hitAngle.normalized * (outputPercent * baseForce);
ballBody.AddForce(hitVector);
StartCoroutine(TrackingBall());
}
private IEnumerator UpdateHitAngle()
{
yield return null;
while (true)
{
yield return null;
BallPositionUpdated?.Invoke(ballBody.transform.position);
Vector3 ballPos = ballBody.transform.position;
Vector3 angleSourcePos = forceDirectionTransform.position;
Vector3 positionDifference = ballPos - angleSourcePos;
Vector3 forceVector = Vector3.ProjectOnPlane(positionDifference,Vector3.down);
ForceDirectionUpdated?.Invoke(forceVector);
hitAngle = forceVector;
}
}
private IEnumerator SlidePower()
{
float timer = 0;
bool goingUp = true;
float timerGoal = timeToMaxPower;
outputPercent = 0.0f;
while (true)
{
while (ballIsMoving) yield return null;
yield return null;
if (inGoal) yield break;
timer += Time.deltaTime;
float percentTime = timer / timerGoal;
outputPercent = goingUp ? percentTime : 1.0f - percentTime;
PowerPercentUpdated?.Invoke(outputPercent);
if (percentTime < 1.0f) continue;
//Bounce back starts here
percentTime = 1.0f;
outputPercent = goingUp ? percentTime : 1.0f - percentTime;
PowerPercentUpdated?.Invoke(outputPercent);
float pauseTimer = 0.0f;
while (pauseTimer < pauseTimeAtEnds)
{
while (ballIsMoving) yield return null;
yield return null;
pauseTimer += Time.deltaTime;
}
SwapDirection();
}
void SwapDirection()
{
goingUp = !goingUp;
timerGoal = goingUp ? timeToMaxPower : timeToMinPower;
timer = 0;
}
}
private IEnumerator TrackingBall()
{

View File

@ -0,0 +1,16 @@
using System;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls
{
public class PositionRecorder : MonoBehaviour
{
public Vector3Variable positionVariable;
private void Update()
{
positionVariable.SetValue(transform.position);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 2265ab9faa443b348ab7b8b268ec317c
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,70 @@
using System;
using System.Collections;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls
{
public class PowerController : MonoBehaviour
{
public FloatVariable powerVariable;
public BoolVariable isPausedVariable;
[SerializeField] private float timeToMaxPower = 1.0f;
[SerializeField] private float pauseTimeAtEnds = 0.05f;
private void Start()
{
StartCoroutine(SlidePower());
}
private IEnumerator SlidePower()
{
float timer = 0;
bool goingUp = true;
float timerGoal = timeToMaxPower;
while (true)
{
while (isPausedVariable.Value) yield return null;
yield return null;
timer += Time.deltaTime;
float percentTime = timer / timerGoal;
float outputPercent = goingUp ? percentTime : 1.0f - percentTime;
powerVariable.SetValue(outputPercent);
if (percentTime < 1.0f) continue;
//Bounce back starts here
percentTime = 1.0f;
outputPercent = goingUp ? percentTime : 1.0f - percentTime;
powerVariable.SetValue(outputPercent);
float pauseTimer = 0.0f;
while (pauseTimer < pauseTimeAtEnds)
{
while (isPausedVariable.Value) yield return null;
yield return null;
pauseTimer += Time.deltaTime;
}
SwapDirection();
}
void SwapDirection()
{
goingUp = !goingUp;
timer = 0;
}
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: d4589060adcf148439fa771bb867ed42
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,27 @@
using System;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls
{
public class StrokeCounter : MonoBehaviour
{
public IntVariable StrokeVariable;
public VoidEvent HitEvent;
private void OnEnable()
{
HitEvent.Register(OnHit);
}
private void OnDisable()
{
HitEvent.Unregister(OnHit);
}
private void OnHit()
{
StrokeVariable.SetValue(StrokeVariable.Value++);
}
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 594dbcb0ac6fee442ac8e47c96781542
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,40 +1,33 @@
using System;
using System.Collections;
using TMPro;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls
{
public class ForceArrow : MonoBehaviour
{
public FloatVariable AngleVariable;
public BoolVariable HideModelVariable;
public Transform followedBallTransform;
public GameObject Model;
public Vector3 arrowOffset = new Vector3(0, .5f, 0);
public float maxBounceSpeed = 0.07f;
public float bounceTimeSeconds = 0.5f;
public TextMeshProUGUI debugText;
private void Start()
{
StartCoroutine(Bouncing());
}
private void OnEnable()
private void Update()
{
GolfControl.BallPositionUpdated += UpdatePos;
GolfControl.ForceDirectionUpdated += UpdateDirection;
GolfControl.HitPowerDecided += OnBallHit;
GolfControl.BallStoppedAtPosition += OnBallStopped;
}
private void OnDisable()
{
GolfControl.BallPositionUpdated -= UpdatePos;
GolfControl.ForceDirectionUpdated -= UpdateDirection;
GolfControl.HitPowerDecided -= OnBallHit;
GolfControl.BallStoppedAtPosition -= OnBallStopped;
UpdatePos(followedBallTransform.position);
UpdateDirection(AngleVariable.Value);
Model.SetActive(!HideModelVariable.Value);
}
private IEnumerator Bouncing()
@ -96,33 +89,13 @@ namespace GolfControls
}
}
}
private void OnBallHit(float _)
private void UpdateDirection(float angle)
{
Model.SetActive(false);
}
private void UpdateDirection(Vector3 direction)
{
double angle = getAngle(Vector2.zero, new Vector2(direction.z, direction.x));
float trueAngle = (float)angle + 180.0f;
Vector3 euler = new Vector3(0, trueAngle, 0);
Vector3 euler = new Vector3(0, angle, 0);
transform.localRotation = Quaternion.Euler(euler);
debugText.text = trueAngle + " : "+direction;
double getAngle(Vector2 me, Vector2 target) {
return Math.Atan2(target.y - me.y, target.x - me.x) * (180/Math.PI);
}
}
private void OnBallStopped(Vector3 ballPosition)
{
UpdatePos(ballPosition);
Model.SetActive(true);
}
private void UpdatePos(Vector3 pos)

View File

@ -1,22 +1,19 @@
using System;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls
{
public class PowerBarDisplay : MonoBehaviour
{
public FloatVariable powerVariable;
[SerializeField]private RectTransform maskRect;
[SerializeField]private RectTransform fillingRect;
private void OnEnable()
private void Update()
{
GolfControl.PowerPercentUpdated += UpdateDisplay;
}
private void OnDisable()
{
GolfControl.PowerPercentUpdated -= UpdateDisplay;
UpdateDisplay(powerVariable.Value);
}
private void UpdateDisplay(float percent)

View File

@ -1,35 +1,37 @@
using System;
using TMPro;
using UnityAtoms.BaseAtoms;
using UnityEngine;
namespace GolfControls.UI
namespace GolfControls
{
public class StrokeDisplay : MonoBehaviour
{
public TextMeshProUGUI numText;
private int currentStrokeCount;
public IntVariable strokeVariable;
private void OnEnable()
public BoolVariable InGoalVariable;
private void Update()
{
GolfControl.strokeCountUpdated += UpdateText;
Goal.GoalHit += OnGoal;
if (InGoalVariable.Value)
{
OnGoal();
return;
}
private void OnDisable()
{
GolfControl.strokeCountUpdated -= UpdateText;
Goal.GoalHit -= OnGoal;
UpdateText(strokeVariable.Value);
}
private void UpdateText(int value)
{
currentStrokeCount = value;
numText.color = Color.white;
numText.text = value.ToString();
}
private void OnGoal()
{
numText.text = "GOAL AT: " + currentStrokeCount;
numText.text = "GOAL AT: " + strokeVariable.Value;
numText.color = Color.green;
}

View File

@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: FairwaytestMat
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0, g: 0.5188679, b: 0.047602743, a: 1}
- _Color: {r: 0, g: 0.51886785, b: 0.04760272, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &5739486430924164922
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 73678ccbb3dd93a49b98147beaadaca3
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GreensTestMat
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 0.4045457, g: 0.9150943, b: 0.012949424, a: 1}
- _Color: {r: 0.40454566, g: 0.9150943, b: 0.012949424, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &5739486430924164922
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: cad0793002f781b41986db06c6c85e95
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,133 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2100000
Material:
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: RoughTestMat
m_Shader: {fileID: 4800000, guid: 933532a4fcc9baf4fa0491de14d08ed7, type: 3}
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 4
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap:
RenderType: Opaque
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
- _BaseMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _BumpMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailAlbedoMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailMask:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _DetailNormalMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _EmissionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MainTex:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _MetallicGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _OcclusionMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _ParallaxMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- _SpecGlossMap:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_Lightmaps:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_LightmapsInd:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
- unity_ShadowMasks:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _AlphaClip: 0
- _AlphaToMask: 0
- _Blend: 0
- _BlendModePreserveSpecular: 1
- _BumpScale: 1
- _ClearCoatMask: 0
- _ClearCoatSmoothness: 0
- _Cull: 2
- _Cutoff: 0.5
- _DetailAlbedoMapScale: 1
- _DetailNormalMapScale: 1
- _DstBlend: 0
- _DstBlendAlpha: 0
- _EnvironmentReflections: 1
- _GlossMapScale: 0
- _Glossiness: 0
- _GlossyReflections: 0
- _Metallic: 0
- _OcclusionStrength: 1
- _Parallax: 0.005
- _QueueOffset: 0
- _ReceiveShadows: 1
- _Smoothness: 0.5
- _SmoothnessTextureChannel: 0
- _SpecularHighlights: 1
- _SrcBlend: 1
- _SrcBlendAlpha: 1
- _Surface: 0
- _WorkflowMode: 1
- _ZWrite: 1
m_Colors:
- _BaseColor: {r: 1, g: 0.8559212, b: 0.5330188, a: 1}
- _Color: {r: 1, g: 0.8559212, b: 0.53301877, a: 1}
- _EmissionColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecColor: {r: 0.19999996, g: 0.19999996, b: 0.19999996, a: 1}
m_BuildTextureStacks: []
--- !u!114 &5739486430924164922
MonoBehaviour:
m_ObjectHideFlags: 11
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: d0353a89b1f911e48b9e16bdc9f2e058, type: 3}
m_Name:
m_EditorClassIdentifier:
version: 7

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: af187d7fb2479cf4b99c7072e489cd44
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 2100000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: a43611782ff21bd46887f230a0052081
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,14 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!134 &13400000
PhysicMaterial:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: FairwayCoursePhysics
dynamicFriction: 0.6
staticFriction: 0.6
bounciness: 0
frictionCombine: 3
bounceCombine: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: dc3bbfd9125f2e347bb9f1c735f06a6d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 13400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,14 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!134 &13400000
PhysicMaterial:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GolfBallPhysics
dynamicFriction: 0.6
staticFriction: 0.6
bounciness: 0
frictionCombine: 3
bounceCombine: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 184736c5873a58647afd11a53f596983
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 13400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,14 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!134 &13400000
PhysicMaterial:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: GreenCoursePhysics
dynamicFriction: 0.6
staticFriction: 1
bounciness: 0
frictionCombine: 3
bounceCombine: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 140f3bc27a8ea964882609604a0c482d
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 13400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,14 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!134 &13400000
PhysicMaterial:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: RoughCoursePhysics
dynamicFriction: 1
staticFriction: 1
bounciness: 0
frictionCombine: 3
bounceCombine: 0

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 617104e845710fc46bade203ad26b4bf
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 13400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -948,6 +948,111 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Padding: {x: 0, y: 0, z: 0, w: 0}
m_Softness: {x: 0, y: 0}
--- !u!1 &371693851
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 371693856}
- component: {fileID: 371693855}
- component: {fileID: 371693854}
- component: {fileID: 371693853}
m_Layer: 0
m_Name: GreensCube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &371693853
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 371693851}
m_Material: {fileID: 13400000, guid: 140f3bc27a8ea964882609604a0c482d, type: 2}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &371693854
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 371693851}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: cad0793002f781b41986db06c6c85e95, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &371693855
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 371693851}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &371693856
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 371693851}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -0.5, y: -0.528, z: 6.87}
m_LocalScale: {x: 10, y: 1, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &434066455
GameObject:
m_ObjectHideFlags: 0
@ -1778,7 +1883,7 @@ Transform:
- {fileID: 765144258}
m_Father: {fileID: 434066458}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1583713030
--- !u!1 &1507380958
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
@ -1786,25 +1891,25 @@ GameObject:
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1583713034}
- component: {fileID: 1583713033}
- component: {fileID: 1583713032}
- component: {fileID: 1583713031}
- component: {fileID: 1507380962}
- component: {fileID: 1507380961}
- component: {fileID: 1507380960}
- component: {fileID: 1507380959}
m_Layer: 0
m_Name: Plane
m_Name: FairwayCube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!64 &1583713031
MeshCollider:
--- !u!65 &1507380959
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1583713030}
m_Material: {fileID: 0}
m_GameObject: {fileID: 1507380958}
m_Material: {fileID: 13400000, guid: dc3bbfd9125f2e347bb9f1c735f06a6d, type: 2}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
@ -1815,17 +1920,16 @@ MeshCollider:
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 5
m_Convex: 0
m_CookingOptions: 30
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!23 &1583713032
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1507380960
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1583713030}
m_GameObject: {fileID: 1507380958}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
@ -1839,7 +1943,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: 667615024e17b434aa5e749805b96a83, type: 2}
- {fileID: 2100000, guid: 73678ccbb3dd93a49b98147beaadaca3, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@ -1861,25 +1965,130 @@ MeshRenderer:
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &1583713033
--- !u!33 &1507380961
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1583713030}
m_Mesh: {fileID: 10209, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1583713034
m_GameObject: {fileID: 1507380958}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1507380962
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1583713030}
m_GameObject: {fileID: 1507380958}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: -0.025, z: 0}
m_LocalScale: {x: 50, y: 1, z: 50}
m_LocalPosition: {x: 4.532, y: -0.528, z: -3.07}
m_LocalScale: {x: 10, y: 1, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1752515851
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1752515856}
- component: {fileID: 1752515855}
- component: {fileID: 1752515854}
- component: {fileID: 1752515853}
m_Layer: 0
m_Name: RoughCube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!65 &1752515853
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1752515851}
m_Material: {fileID: 13400000, guid: 617104e845710fc46bade203ad26b4bf, type: 2}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 0
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!23 &1752515854
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1752515851}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 2
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: af187d7fb2479cf4b99c7072e489cd44, type: 2}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
m_StaticBatchRoot: {fileID: 0}
m_ProbeAnchor: {fileID: 0}
m_LightProbeVolumeOverride: {fileID: 0}
m_ScaleInLightmap: 1
m_ReceiveGI: 1
m_PreserveUVs: 0
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
m_StitchLightmapSeams: 1
m_SelectedEditorRenderState: 3
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_AdditionalVertexStreams: {fileID: 0}
--- !u!33 &1752515855
MeshFilter:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1752515851}
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
--- !u!4 &1752515856
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1752515851}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: -5.48, y: -0.528, z: -3.08}
m_LocalScale: {x: 10, y: 1, z: 10}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
@ -1935,6 +2144,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
numText: {fileID: 1780702395}
strokeVariable: {fileID: 0}
InGoalVariable: {fileID: 0}
--- !u!114 &1780702395
MonoBehaviour:
m_ObjectHideFlags: 0
@ -2120,7 +2331,7 @@ MonoBehaviour:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1807783553}
m_Enabled: 1
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c2fadf230d1919748a9aa21d40f74619, type: 3}
m_Name:
@ -2330,7 +2541,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!114 &1867824958
MonoBehaviour:
m_ObjectHideFlags: 0
@ -2494,11 +2705,13 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9376744b6cad1d5429f2ecfb2a907fa6, type: 3}
m_Name:
m_EditorClassIdentifier:
AngleVariable: {fileID: 11400000, guid: 390945e28bef9ed42b6a83711c25732f, type: 2}
HideModelVariable: {fileID: 11400000, guid: 838a13f5fd312c94398e49cfc36e34ad, type: 2}
followedBallTransform: {fileID: 6435234068943728827}
Model: {fileID: 919132148849281603}
arrowOffset: {x: 0, y: 0.05, z: 0}
maxBounceSpeed: 0.08
bounceTimeSeconds: 0.5
debugText: {fileID: 1780702395}
--- !u!1 &2085994264
GameObject:
m_ObjectHideFlags: 0
@ -2649,24 +2862,6 @@ Transform:
m_Children: []
m_Father: {fileID: 2041401174}
m_LocalEulerAnglesHint: {x: 63.063, y: -180, z: -90}
--- !u!114 &698447725896810587
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3462027135864970849}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a5e3cbe56ffba194f918c58a33a3a411, type: 3}
m_Name:
m_EditorClassIdentifier:
timeToMaxPower: 1.2
timeToMinPower: 1.2
pauseTimeAtEnds: 0.02
forceDirectionTransform: {fileID: 1807783554}
ballBody: {fileID: 3921340267877587735}
baseForce: 50
--- !u!222 &737333144983527555
CanvasRenderer:
m_ObjectHideFlags: 0
@ -2719,9 +2914,9 @@ MonoBehaviour:
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 698447725896810587}
m_TargetAssemblyTypeName: GolfControls.GolfControl, Assembly-CSharp
m_MethodName: HitBall
- m_Target: {fileID: 11400000, guid: 90fa28c269919df41acdd37835ee3b9e, type: 2}
m_TargetAssemblyTypeName: UnityAtoms.BaseAtoms.VoidEvent, UnityAtoms.UnityAtomsBaseAtoms.Runtime
m_MethodName: Raise
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
@ -3009,7 +3204,8 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 7853147040506322296}
- component: {fileID: 698447725896810587}
- component: {fileID: 7853147040506322297}
- component: {fileID: 7853147040506322298}
m_Layer: 0
m_Name: GolfController
m_TagString: Untagged
@ -3167,7 +3363,7 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 0
m_UseGravity: 1
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
@ -3181,7 +3377,7 @@ Transform:
m_GameObject: {fileID: 2050288998095584909}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0.391, z: 2.5}
m_LocalPosition: {x: 0, y: 0.391, z: 2.823}
m_LocalScale: {x: 0.15, y: 0.5, z: 0.15}
m_ConstrainProportionsScale: 0
m_Children: []
@ -3207,7 +3403,7 @@ MeshRenderer:
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 2100000, guid: d1c2dd36238620e4191308075fbf7f84, type: 2}
- {fileID: -382652638819485698, guid: f396e3429a4864fc2ad497cb3ce5fe2c, type: 3}
m_StaticBatchInfo:
firstSubMesh: 0
subMeshCount: 0
@ -3436,6 +3632,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 1f529ce348a22904a9ab8eeb79569f5a, type: 3}
m_Name:
m_EditorClassIdentifier:
powerVariable: {fileID: 11400000, guid: b5aa4452d8d082d48b46495c7352e39e, type: 2}
maskRect: {fileID: 363616411}
fillingRect: {fileID: 1861098572297249915}
--- !u!224 &5969245950916785549
@ -3469,6 +3666,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 9c383db349f0944448e5ffd8b2f6b1b0, type: 3}
m_Name:
m_EditorClassIdentifier:
hitVariable: {fileID: 11400000, guid: 3b0e06d0a76bceb4296c54d02f0d34a4, type: 2}
myMeshRenderer: {fileID: 4313507671522100049}
Material: {fileID: 2100000, guid: fe0b1757fa9fa8d47a57da9423786da6, type: 2}
--- !u!1 &6245199234966100619
@ -3507,7 +3705,7 @@ Transform:
m_GameObject: {fileID: 7237674694152796921}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 1}
m_LocalPosition: {x: 1.234, y: 0, z: 0.37}
m_LocalScale: {x: 0.05, y: 0.05, z: 0.05}
m_ConstrainProportionsScale: 0
m_Children: []
@ -3698,6 +3896,8 @@ GameObject:
- component: {fileID: 8702281690079513735}
- component: {fileID: 7506458257522486646}
- component: {fileID: 3921340267877587735}
- component: {fileID: 8741305066849015581}
- component: {fileID: 8741305066849015582}
m_Layer: 0
m_Name: TestGolfBall
m_TagString: Untagged
@ -3729,7 +3929,7 @@ SphereCollider:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7237674694152796921}
m_Material: {fileID: 0}
m_Material: {fileID: 13400000, guid: 184736c5873a58647afd11a53f596983, type: 2}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
@ -3758,6 +3958,36 @@ Transform:
m_Children: []
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &7853147040506322297
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3462027135864970849}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d4589060adcf148439fa771bb867ed42, type: 3}
m_Name:
m_EditorClassIdentifier:
powerVariable: {fileID: 11400000, guid: b5aa4452d8d082d48b46495c7352e39e, type: 2}
isPausedVariable: {fileID: 11400000, guid: 838a13f5fd312c94398e49cfc36e34ad, type: 2}
timeToMaxPower: 1
pauseTimeAtEnds: 0.05
--- !u!114 &7853147040506322298
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3462027135864970849}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 594dbcb0ac6fee442ac8e47c96781542, type: 3}
m_Name:
m_EditorClassIdentifier:
StrokeVariable: {fileID: 11400000, guid: b17566f4d19813249a993793ac86d94c, type: 2}
HitEvent: {fileID: 11400000, guid: 90fa28c269919df41acdd37835ee3b9e, type: 2}
--- !u!222 &8141010434514370326
CanvasRenderer:
m_ObjectHideFlags: 0
@ -3779,6 +4009,8 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
numText: {fileID: 5357977733061384911}
strokeVariable: {fileID: 11400000, guid: b17566f4d19813249a993793ac86d94c, type: 2}
InGoalVariable: {fileID: 11400000, guid: 3b0e06d0a76bceb4296c54d02f0d34a4, type: 2}
--- !u!224 &8523137829294198608
RectTransform:
m_ObjectHideFlags: 0
@ -3849,6 +4081,39 @@ MeshFilter:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7237674694152796921}
m_Mesh: {fileID: 10207, guid: 0000000000000000e000000000000000, type: 0}
--- !u!114 &8741305066849015581
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7237674694152796921}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 81288180c711998469ce58b134a7aa18, type: 3}
m_Name:
m_EditorClassIdentifier:
directionVariable: {fileID: 11400000, guid: e4e9bdd2ae454dc4f8de59b2261b337a, type: 2}
angleVariable: {fileID: 11400000, guid: 390945e28bef9ed42b6a83711c25732f, type: 2}
targetTransform: {fileID: 1807783554}
--- !u!114 &8741305066849015582
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7237674694152796921}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cd75af7762b9bcb46978ba8c4372c233, type: 3}
m_Name:
m_EditorClassIdentifier:
ballHitEvent: {fileID: 11400000, guid: 90fa28c269919df41acdd37835ee3b9e, type: 2}
AngleVariable: {fileID: 11400000, guid: e4e9bdd2ae454dc4f8de59b2261b337a, type: 2}
PowerVariable: {fileID: 11400000, guid: b5aa4452d8d082d48b46495c7352e39e, type: 2}
isMovingVariable: {fileID: 11400000, guid: 838a13f5fd312c94398e49cfc36e34ad, type: 2}
inHoleVariable: {fileID: 11400000, guid: 3b0e06d0a76bceb4296c54d02f0d34a4, type: 2}
baseForce: 200
--- !u!224 &8967829807584265088
RectTransform:
m_ObjectHideFlags: 0
@ -3881,5 +4146,7 @@ SceneRoots:
- {fileID: 4215445498302113601}
- {fileID: 2085994267}
- {fileID: 1028760416}
- {fileID: 1583713034}
- {fileID: 2041401174}
- {fileID: 1507380962}
- {fileID: 1752515856}
- {fileID: 371693856}

8
Assets/Variables.meta Normal file
View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 272c4eff02adfd046b1e62368ba65cdb
folderAsset: yes
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
%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: 593b70f10d7bb41c78d42c7e8b6609da, type: 3}
m_Name: BallMoving
m_EditorClassIdentifier:
_developerDescription:
_id:
_value: 0
_changed: {fileID: 11400000, guid: 3bcc195503d3fdc49becc7bf3dfb3ac0, type: 2}
_changedWithHistory: {fileID: 0}
_triggerChangedOnOnEnable: 0
_triggerChangedWithHistoryOnOnEnable: 0
_oldValue: 0
_initialValue: 0
_preChangeTransformers: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 838a13f5fd312c94398e49cfc36e34ad
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
%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: 2f868f8b3380b47a38cf0b95f42c134b, type: 3}
m_Name: BallPosition
m_EditorClassIdentifier:
_developerDescription:
_id:
_value: {x: 0, y: 0, z: 0}
_changed: {fileID: 11400000, guid: 04b9bfad3b810c14787fd5eefdfbb3df, type: 2}
_changedWithHistory: {fileID: 0}
_triggerChangedOnOnEnable: 0
_triggerChangedWithHistoryOnOnEnable: 0
_oldValue: {x: 0, y: 0, z: 0}
_initialValue: {x: 0, y: 0, z: 0}
_preChangeTransformers: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 1b01dd0a7a5d5ea45b4d83161b28dcc8
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
%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: 0b46c0f62c93543f88d3eb693740d091, type: 3}
m_Name: HitAngle
m_EditorClassIdentifier:
_developerDescription:
_id:
_value: 0
_changed: {fileID: 11400000, guid: 3d79018212ca7324180043af246910d7, type: 2}
_changedWithHistory: {fileID: 0}
_triggerChangedOnOnEnable: 0
_triggerChangedWithHistoryOnOnEnable: 0
_oldValue: 0
_initialValue: 0
_preChangeTransformers: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 390945e28bef9ed42b6a83711c25732f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
%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: 2f868f8b3380b47a38cf0b95f42c134b, type: 3}
m_Name: HitDirection
m_EditorClassIdentifier:
_developerDescription:
_id:
_value: {x: 0, y: 0, z: 0}
_changed: {fileID: 0}
_changedWithHistory: {fileID: 0}
_triggerChangedOnOnEnable: 0
_triggerChangedWithHistoryOnOnEnable: 0
_oldValue: {x: 0, y: 0, z: 0}
_initialValue: {x: 0, y: 0, z: 0}
_preChangeTransformers: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: e4e9bdd2ae454dc4f8de59b2261b337a
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
%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: 593b70f10d7bb41c78d42c7e8b6609da, type: 3}
m_Name: InGoal
m_EditorClassIdentifier:
_developerDescription:
_id:
_value: 0
_changed: {fileID: 0}
_changedWithHistory: {fileID: 0}
_triggerChangedOnOnEnable: 0
_triggerChangedWithHistoryOnOnEnable: 0
_oldValue: 0
_initialValue: 0
_preChangeTransformers: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 3b0e06d0a76bceb4296c54d02f0d34a4
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
%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: 0b46c0f62c93543f88d3eb693740d091, type: 3}
m_Name: PowerPercent
m_EditorClassIdentifier:
_developerDescription:
_id:
_value: 0
_changed: {fileID: 11400000, guid: 06513dd0ac49eda47a510ee57c3faee2, type: 2}
_changedWithHistory: {fileID: 0}
_triggerChangedOnOnEnable: 0
_triggerChangedWithHistoryOnOnEnable: 0
_oldValue: 0
_initialValue: 0
_preChangeTransformers: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b5aa4452d8d082d48b46495c7352e39e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -0,0 +1,24 @@
%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: cf8a67b68db3d4650908f8cf6adeda60, type: 3}
m_Name: StrokeCount
m_EditorClassIdentifier:
_developerDescription:
_id:
_value: 0
_changed: {fileID: 0}
_changedWithHistory: {fileID: 0}
_triggerChangedOnOnEnable: 0
_triggerChangedWithHistoryOnOnEnable: 0
_oldValue: 0
_initialValue: 0
_preChangeTransformers: []

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: b17566f4d19813249a993793ac86d94c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View 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: TriggerBallHit
m_EditorClassIdentifier:
_developerDescription:
_replayBufferSize: 1

View File

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 90fa28c269919df41acdd37835ee3b9e
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View File

@ -1,4 +1,21 @@
{
"scopedRegistries": [
{
"name": "NPM Registry",
"url": "https://registry.npmjs.org",
"scopes": [
"com.unity-atoms.unity-atoms-core",
"com.unity-atoms.unity-atoms-base-atoms",
"com.unity-atoms.unity-atoms-fsm",
"com.unity-atoms.unity-atoms-mobile",
"com.unity-atoms.unity-atoms-mono-hooks",
"com.unity-atoms.unity-atoms-tags",
"com.unity-atoms.unity-atoms-scene-mgmt",
"com.unity-atoms.unity-atoms-ui",
"com.unity-atoms.unity-atoms-input-system"
]
}
],
"dependencies": {
"com.unity.ide.rider": "3.0.28",
"com.unity.ide.visualstudio": "2.0.22",
@ -47,6 +64,11 @@
"com.unity.modules.video": "1.0.0",
"com.unity.modules.vr": "1.0.0",
"com.unity.modules.wind": "1.0.0",
"com.unity.modules.xr": "1.0.0"
"com.unity.modules.xr": "1.0.0",
"com.unity-atoms.unity-atoms-core": "4.5.0",
"com.unity-atoms.unity-atoms-base-atoms": "4.5.0",
"com.unity-atoms.unity-atoms-fsm": "4.5.0",
"com.unity-atoms.unity-atoms-mobile": "4.5.0",
"com.unity-atoms.unity-atoms-mono-hooks": "4.5.0"
}
}

View File

@ -1,5 +1,56 @@
{
"dependencies": {
"com.unity-atoms.unity-atoms-base-atoms": {
"version": "4.5.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.physics": "1.0.0",
"com.unity.modules.physics2d": "1.0.0",
"com.unity-atoms.unity-atoms-core": "4.5.0"
},
"url": "https://registry.npmjs.org"
},
"com.unity-atoms.unity-atoms-core": {
"version": "4.5.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.modules.uielements": "1.0.0"
},
"url": "https://registry.npmjs.org"
},
"com.unity-atoms.unity-atoms-fsm": {
"version": "4.5.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity-atoms.unity-atoms-core": "4.5.0",
"com.unity-atoms.unity-atoms-base-atoms": "4.5.0"
},
"url": "https://registry.npmjs.org"
},
"com.unity-atoms.unity-atoms-mobile": {
"version": "4.5.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity-atoms.unity-atoms-core": "4.5.0",
"com.unity-atoms.unity-atoms-base-atoms": "4.5.0"
},
"url": "https://registry.npmjs.org"
},
"com.unity-atoms.unity-atoms-mono-hooks": {
"version": "4.5.0",
"depth": 0,
"source": "registry",
"dependencies": {
"com.unity.ugui": "1.0.0",
"com.unity-atoms.unity-atoms-core": "4.5.0",
"com.unity-atoms.unity-atoms-base-atoms": "4.5.0"
},
"url": "https://registry.npmjs.org"
},
"com.unity.burst": {
"version": "1.8.12",
"depth": 1,

View File

@ -26,11 +26,27 @@ MonoBehaviour:
m_IsDefault: 1
m_Capabilities: 7
m_ConfigSource: 0
m_UserSelectedRegistryName:
- m_Id: scoped:project:NPM Registry
m_Name: NPM Registry
m_Url: https://registry.npmjs.org
m_Scopes:
- com.unity-atoms.unity-atoms-core
- com.unity-atoms.unity-atoms-base-atoms
- com.unity-atoms.unity-atoms-fsm
- com.unity-atoms.unity-atoms-mobile
- com.unity-atoms.unity-atoms-mono-hooks
- com.unity-atoms.unity-atoms-tags
- com.unity-atoms.unity-atoms-scene-mgmt
- com.unity-atoms.unity-atoms-ui
- com.unity-atoms.unity-atoms-input-system
m_IsDefault: 0
m_Capabilities: 0
m_ConfigSource: 4
m_UserSelectedRegistryName: NPM Registry
m_UserAddingNewScopedRegistry: 0
m_RegistryInfoDraft:
m_Modified: 0
m_ErrorMessage:
m_UserModificationsInstanceId: -858
m_OriginalInstanceId: -862
m_UserModificationsInstanceId: -838
m_OriginalInstanceId: -840
m_LoadAssets: 0