Browse Source

Gold Miner plus a number of variations on Name Dropper as their own games

master
Josh 1 year ago
parent
commit
388951d854
  1. 26
      namedropper/Assets/GoldMiner.cs
  2. 11
      namedropper/Assets/GoldMiner.cs.meta
  3. 30
      namedropper/Assets/GoldMinerTarget.cs
  4. 11
      namedropper/Assets/GoldMinerTarget.cs.meta
  5. 545
      namedropper/Assets/Prefabs/GoldMinerTargetPrefab.prefab
  6. 7
      namedropper/Assets/Prefabs/GoldMinerTargetPrefab.prefab.meta
  7. 5493
      namedropper/Assets/Scenes/GoldMiner.unity
  8. 7
      namedropper/Assets/Scenes/GoldMiner.unity.meta
  9. 1520
      namedropper/Assets/Scenes/Wheel Scene.unity
  10. 17
      namedropper/Assets/Scripts/GameDataManager.cs
  11. 3
      namedropper/Assets/Scripts/Level.cs
  12. 65
      namedropper/Assets/Scripts/Player.cs
  13. BIN
      namedropper/Assets/Sprites/pops/pop_gold.png
  14. 123
      namedropper/Assets/Sprites/pops/pop_gold.png.meta
  15. BIN
      namedropper/Assets/_FortuneWheel/Graphics/wheel-assets.png
  16. 51
      namedropper/Assets/_FortuneWheel/Scripts/FortuneWheel.cs
  17. 3
      namedropper/ProjectSettings/EditorBuildSettings.asset

26
namedropper/Assets/GoldMiner.cs

@ -0,0 +1,26 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GoldMiner : Level
{
[SerializeField] GameObject _goldMinerTargetPrefab;
[SerializeField] Canvas _canvas;
// Start is called before the first frame update
void Start()
{
for (int i = 0; i < 35; ++i)
{
GameObject target = Instantiate(_goldMinerTargetPrefab);
target.transform.parent = _canvas.gameObject.transform;
target.transform.localPosition = new Vector3(Random.Range(-928, 928), Random.Range(-256f, 490f), target.transform.position.z);
}
}
// Update is called once per frame
void Update()
{
}
}

11
namedropper/Assets/GoldMiner.cs.meta

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

30
namedropper/Assets/GoldMinerTarget.cs

@ -0,0 +1,30 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using YamlDotNet.Core.Tokens;
public class GoldMinerTarget : MonoBehaviour
{
[SerializeField] TMPro.TMP_Text _text;
public int _value;
public const float MIN_SCALE = .3f;
// Start is called before the first frame update
void Start()
{
_value = Random.Range(-1, 4);
if (_value < 0)
_value = 0;
_text.text = _value.ToString();
float scale = Random.Range(MIN_SCALE, 1.25f);
transform.localScale = new Vector3(scale, scale, transform.localScale.z);
}
// Update is called once per frame
void Update()
{
}
}

11
namedropper/Assets/GoldMinerTarget.cs.meta

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

545
namedropper/Assets/Prefabs/GoldMinerTargetPrefab.prefab

@ -0,0 +1,545 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2442313134416151772
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2346527770907117705}
- component: {fileID: 3541953471929212041}
m_Layer: 0
m_Name: sprite_top
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!224 &2346527770907117705
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2442313134416151772}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -3.63}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8127365828183894291}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!212 &3541953471929212041
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2442313134416151772}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
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: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 1add9ada81d54bd4f9206ea8f7ae521d, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 160, y: 159}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &4187487802334739430
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5734564289767309853}
- component: {fileID: 2086567262736496887}
m_Layer: 0
m_Name: sprite
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5734564289767309853
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4187487802334739430}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -0.16}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8127365828183894291}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 100, y: 100}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!212 &2086567262736496887
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4187487802334739430}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
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: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: d2e2d1c2f01bbe341985e6f91c2544cb, type: 3}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 160, y: 159}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &5393868369705630349
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 9180452716823837962}
- component: {fileID: 1260356747307854570}
m_Layer: 0
m_Name: GameObject
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!4 &9180452716823837962
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5393868369705630349}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -5, y: -5, z: -0.16}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8127365828183894291}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!212 &1260356747307854570
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5393868369705630349}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
m_DynamicOccludee: 1
m_StaticShadowCaster: 0
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_RayTracingMode: 0
m_RayTraceProcedural: 0
m_RenderingLayerMask: 1
m_RendererPriority: 0
m_Materials:
- {fileID: 10754, guid: 0000000000000000f000000000000000, type: 0}
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: 0
m_MinimumChartSize: 4
m_AutoUVMaxDistance: 0.5
m_AutoUVMaxAngle: 89
m_LightmapParameters: {fileID: 0}
m_SortingLayerID: 0
m_SortingLayer: 0
m_SortingOrder: 0
m_Sprite: {fileID: 21300000, guid: 53a3b3c44060d8e40b7a2bc4b844e364, type: 3}
m_Color: {r: 0, g: 0, b: 0, a: 0.5686275}
m_FlipX: 0
m_FlipY: 0
m_DrawMode: 0
m_Size: {x: 160, y: 159}
m_AdaptiveModeThreshold: 0.5
m_SpriteTileMode: 0
m_WasSpriteAssigned: 1
m_MaskInteraction: 0
m_SpriteSortPoint: 0
--- !u!1 &7183871359580354488
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2328482245975693127}
- component: {fileID: 4528063284623503189}
- component: {fileID: 910673862333889014}
- component: {fileID: 5357217462330917453}
m_Layer: 0
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2328482245975693127
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7183871359580354488}
m_LocalRotation: {x: 0, y: 0, z: -0.039957315, w: 0.9992014}
m_LocalPosition: {x: 0, y: 0, z: 122.6}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 8127365828183894291}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: -4.58}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 0, y: 1.85}
m_SizeDelta: {x: 110, y: 110}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!23 &4528063284623503189
MeshRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7183871359580354488}
m_Enabled: 1
m_CastShadows: 0
m_ReceiveShadows: 0
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: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, 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!222 &910673862333889014
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7183871359580354488}
m_CullTransparentMesh: 1
--- !u!114 &5357217462330917453
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7183871359580354488}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: 1
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 4fe6d5308385b4341885d0d510c8e2aa, type: 2}
m_sharedMaterial: {fileID: 1001970574707011636, guid: 4fe6d5308385b4341885d0d510c8e2aa, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 72
m_fontSizeBase: 46.9
m_fontWeight: 400
m_enableAutoSizing: 1
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_enableWordWrapping: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 1
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
--- !u!1 &8127365828183894314
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 8127365828183894291}
- component: {fileID: 8127365828183894289}
- component: {fileID: 8127365828183894288}
- component: {fileID: 8127365828183894317}
- component: {fileID: 963413702744540217}
m_Layer: 6
m_Name: GoldMinerTargetPrefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &8127365828183894291
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8127365828183894314}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 10}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 2328482245975693127}
- {fileID: 9180452716823837962}
- {fileID: 5734564289767309853}
- {fileID: 2346527770907117705}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: -299, y: -74}
m_SizeDelta: {x: 157, y: 164}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!58 &8127365828183894289
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8127365828183894314}
m_Enabled: 1
m_Density: 1
m_Material: {fileID: 0}
m_IsTrigger: 1
m_UsedByEffector: 0
m_UsedByComposite: 0
m_Offset: {x: 0, y: 0}
serializedVersion: 2
m_Radius: 76.06
--- !u!222 &8127365828183894288
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8127365828183894314}
m_CullTransparentMesh: 1
--- !u!50 &8127365828183894317
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8127365828183894314}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 0.5
m_LinearDrag: 8.04
m_AngularDrag: 0.05
m_GravityScale: 0
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 4
--- !u!114 &963413702744540217
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8127365828183894314}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5de0e23774891254f97f52ed310ec36a, type: 3}
m_Name:
m_EditorClassIdentifier:
_text: {fileID: 5357217462330917453}
_value: 0

7
namedropper/Assets/Prefabs/GoldMinerTargetPrefab.prefab.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 8d6a5ff06992c5940bee56932870af55
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

5493
namedropper/Assets/Scenes/GoldMiner.unity

File diff suppressed because it is too large

7
namedropper/Assets/Scenes/GoldMiner.unity.meta

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 1681b9b07241c1e438ef69806c138da9
DefaultImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

1520
namedropper/Assets/Scenes/Wheel Scene.unity

File diff suppressed because it is too large

17
namedropper/Assets/Scripts/GameDataManager.cs

@ -36,6 +36,23 @@ public class GameDataManager {
return topicData;
}
public TopicData GetTopic(string topicName)
{
if (_gameData.Topics.Count == 0)
{
Reset();
}
foreach (TopicData topicData in _gameData.Topics)
{
if (topicData.Topic == topicName)
return topicData;
}
return null;
}
public CategoryData GetRandomCategoryData(TopicData topicData, bool removeFromTopic = true)
{

3
namedropper/Assets/Scripts/Level.cs

@ -18,6 +18,7 @@ public class Level : MonoBehaviour
static bool _paused = false;
public static bool Paused { get => _paused; set => _paused = value; }
const bool ALWAYS_INCLUDE_ALL_PLAYERS = true;
// Start is called before the first frame update
public void Start()
@ -105,7 +106,7 @@ public class Level : MonoBehaviour
{
foreach (GameObject player in _players)
{
if (GameManager.Instance.PlayerJoined[player.GetComponent<Player>()._playerNumber] == true ||
if (ALWAYS_INCLUDE_ALL_PLAYERS || GameManager.Instance.PlayerJoined[player.GetComponent<Player>()._playerNumber] == true ||
SceneManager.GetActiveScene().name == "Title" ||
SceneManager.GetActiveScene().name == "Ontology"
)

65
namedropper/Assets/Scripts/Player.cs

@ -42,7 +42,11 @@ public class Player : MonoBehaviour
int _laps = 0;
public TopicData OntologyTopicData;
float _stunTime = 0f;
public bool _goldMiner = false;
public bool _goldMinerLaunched = false;
public bool _goldMinerReturning = false;
GameObject _carrying = null;
float _carriedWeight = 1f;
public float StunTime{
get
{
@ -59,6 +63,7 @@ public class Player : MonoBehaviour
public Rigidbody2D _rigidbody;
private bool _touchedMidpoint;
private RaceGame _raceGame;
private GoldMiner _goldMinerGame;
private void Awake()
{
@ -78,6 +83,7 @@ public class Player : MonoBehaviour
_originalTextScale = _text.transform.localScale;
_game = FindObjectOfType<Game>();
_raceGame = FindObjectOfType<RaceGame>();
_goldMinerGame = FindObjectOfType<GoldMiner>();
_originalPosition = transform.position;
@ -350,6 +356,19 @@ public class Player : MonoBehaviour
_powerupTimeLeft = 10f;
}
// gold miner target
GoldMinerTarget goldMinerTarget = collision.gameObject.GetComponent<GoldMinerTarget>();
if (goldMinerTarget != null && _goldMinerLaunched)
{
this._rigidbody.velocity = Vector3.zero;
goldMinerTarget.transform.parent = this.transform;
goldMinerTarget.transform.localPosition = Vector3.zero;
_goldMinerReturning = true;
_carrying = goldMinerTarget.gameObject;
_carriedWeight = GoldMinerTarget.MIN_SCALE / _carrying.transform.localScale.x;
}
// gummy
Gummy gummy = collision.gameObject.GetComponent<Gummy>();
if (gummy != null)
@ -438,10 +457,21 @@ public class Player : MonoBehaviour
public void AddVelocity(Vector2 velocity)
{
if (PassInputOnto != null)
PassInputOnto.AddVelocity(velocity);
else
_rigidbody.velocity += velocity;
if (_goldMiner)
{
if (_goldMinerLaunched == false && velocity.y > 0f)
{
_rigidbody.velocity += velocity * 5000f;
_goldMinerLaunched = true;
}
}
else //all games but goldminer
{
if (PassInputOnto != null)
PassInputOnto.AddVelocity(velocity);
else
_rigidbody.velocity += velocity;
}
}
// Update is called once per frame
@ -454,6 +484,31 @@ public class Player : MonoBehaviour
return;
}
if (_goldMinerLaunched && _goldMinerReturning == false)
{
if (this._rigidbody.velocity.magnitude <= 0f)
{
_goldMinerReturning = true;
_carriedWeight = 1f;
}
}
const float RETURN_SPEED = 500f;
if (_goldMinerReturning)
{
transform.position = Vector3.MoveTowards(transform.position, _originalPosition, RETURN_SPEED * Time.deltaTime * _carriedWeight);
if ((transform.position - _originalPosition).magnitude <= .1f)
{
_goldMinerLaunched = false;
_goldMinerReturning = false;
transform.position = _originalPosition;
print("Adding score: " + _carrying.GetComponent<GoldMinerTarget>()._value);
_goldMinerGame.AddScore(_carrying.GetComponent<GoldMinerTarget>()._value *10, _playerNumber);
GameObject.Destroy(_carrying);
}
}
_timeToFlip -= Time.deltaTime;

BIN
namedropper/Assets/Sprites/pops/pop_gold.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.6 KiB

123
namedropper/Assets/Sprites/pops/pop_gold.png.meta

@ -0,0 +1,123 @@
fileFormatVersion: 2
guid: d2e2d1c2f01bbe341985e6f91c2544cb
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
serializedVersion: 12
mipmaps:
mipMapMode: 0
enableMipMap: 0
sRGBTexture: 1
linearTexture: 0
fadeOut: 0
borderMipMap: 0
mipMapsPreserveCoverage: 0
alphaTestReferenceValue: 0.5
mipMapFadeDistanceStart: 1
mipMapFadeDistanceEnd: 3
bumpmap:
convertToNormalMap: 0
externalNormalMap: 0
heightScale: 0.25
normalMapFilter: 0
isReadable: 0
streamingMipmaps: 0
streamingMipmapsPriority: 0
vTOnly: 0
ignoreMasterTextureLimit: 0
grayScaleToAlpha: 0
generateCubemap: 6
cubemapConvolution: 0
seamlessCubemap: 0
textureFormat: 1
maxTextureSize: 2048
textureSettings:
serializedVersion: 2
filterMode: 1
aniso: 1
mipBias: 0
wrapU: 1
wrapV: 1
wrapW: 1
nPOTScale: 0
lightmap: 0
compressionQuality: 50
spriteMode: 1
spriteExtrude: 1
spriteMeshType: 1
alignment: 0
spritePivot: {x: 0.5, y: 0.5}
spritePixelsToUnits: 1
spriteBorder: {x: 0, y: 0, z: 0, w: 0}
spriteGenerateFallbackPhysicsShape: 1
alphaUsage: 1
alphaIsTransparency: 1
spriteTessellationDetail: -1
textureType: 8
textureShape: 1
singleChannelComponent: 0
flipbookRows: 1
flipbookColumns: 1
maxTextureSizeSet: 0
compressionQualitySet: 0
textureFormatSet: 0
ignorePngGamma: 0
applyGammaDecoding: 0
cookieLightType: 0
platformSettings:
- serializedVersion: 3
buildTarget: DefaultTexturePlatform
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Standalone
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
- serializedVersion: 3
buildTarget: Server
maxTextureSize: 2048
resizeAlgorithm: 0
textureFormat: -1
textureCompression: 1
compressionQuality: 50
crunchedCompression: 0
allowsAlphaSplitting: 0
overridden: 0
androidETC2FallbackOverride: 0
forceMaximumCompressionQuality_BC6H_BC7: 0
spriteSheet:
serializedVersion: 2
sprites: []
outline: []
physicsShape: []
bones: []
spriteID: 5e97eb03825dee720800000000000000
internalID: 0
vertices: []
indices:
edges: []
weights: []
secondaryTextures: []
nameFileIdTable: {}
spritePackingTag:
pSDRemoveMatte: 0
pSDShowRemoveMatteOption: 0
userData:
assetBundleName:
assetBundleVariant:

BIN
namedropper/Assets/_FortuneWheel/Graphics/wheel-assets.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 690 KiB

After

Width:  |  Height:  |  Size: 714 KiB

51
namedropper/Assets/_FortuneWheel/Scripts/FortuneWheel.cs

@ -4,6 +4,9 @@
using System.Collections;
using UnityEngine.UI;
using UnityEngine.SceneManagement;
using UnityEditor.Experimental.GraphView;
using YamlDotNet.Core.Tokens;
public class FortuneWheel : MonoBehaviour
{
[Header("UI Properties")]
@ -140,6 +143,13 @@
//StartCoroutine(IncrementCoroutine(coinsText, Coins + FortuneWheelConfig.Instance.prizes[SelectedReward], Coins));
}
void LoadNameDropper(string topicName)
{
GameDataManager.Instance.CurrentTopic = GameDataManager.Instance.GetTopic(topicName);
SceneManager.LoadScene("Game");
}
void GivePrize()
{
AnimateWheel(true);
@ -154,7 +164,41 @@
{
sceneName = "TopicSelect";
}
else if (_gameName == "Indie 500" || _gameName.Contains("Bumper"))
else if (_gameName.Contains("Popstar Pursuit"))
{
LoadNameDropper("Contemporary Pop Music");
}
else if (_gameName.Contains("TV Party"))
{
LoadNameDropper("Contemporary TV");
}
else if (_gameName.Contains("Netflix")) // & Skill
{
LoadNameDropper("Netflix Shows");
}
else if (_gameName.Contains("Pixel")) // Pixel Prodigies
{
LoadNameDropper("Videogame Characters");
}
else if (_gameName.Contains("Nik's Ark"))
{
LoadNameDropper("Animals");
}
else if (_gameName.Contains("Tipsy")) //Let's Get Tipsy
{
LoadNameDropper("Alcohol");
}
else if (_gameName.Contains("Record Scratch"))
{
LoadNameDropper("Music Genres");
}
else if (_gameName == "Gold Digger" || _gameName == "Gold Miner" || _gameName.Contains("49er"))
{
sceneName = "GoldMiner";
}
else if (_gameName == "Indie 500" || _gameName.Contains("Bumper") || _gameName.Contains("Crazy Kart"))
{
sceneName = "RaceGame";
}
@ -170,8 +214,9 @@
{
Debug.LogError("unknown game name: " + _gameName);
}
SceneManager.LoadScene(sceneName);
if (sceneName != "")
SceneManager.LoadScene(sceneName);
}
IEnumerator ShowHideParticles()

3
namedropper/ProjectSettings/EditorBuildSettings.asset

@ -32,6 +32,9 @@ EditorBuildSettings:
- enabled: 0
path:
guid: 00000000000000000000000000000000
- enabled: 1
path: Assets/Scenes/GoldMiner.unity
guid: 1681b9b07241c1e438ef69806c138da9
- enabled: 1
path: Assets/Scenes/Wheel Scene.unity
guid: 6ca8f0d3b0498db4cb867d37d1589231

Loading…
Cancel
Save