Browse Source

first playable of ontology the game

combinedRaceAndNameDropper
Josh 1 year ago
parent
commit
d906dd4ba1
  1. 15
      namedropper/Assets/OntologyGame.cs
  2. 19
      namedropper/Assets/OntologyWord.cs
  3. 149
      namedropper/Assets/Prefabs/OntologyWord Prefab.prefab
  4. 253
      namedropper/Assets/Scenes/Ontology.unity
  5. 10
      namedropper/Assets/Scenes/Wheel Scene.unity
  6. 6
      namedropper/Assets/Scripts/GameDataManager.cs
  7. 55
      namedropper/Assets/Scripts/Player.cs
  8. 5
      namedropper/Assets/Scripts/TrackballInputManager.cs
  9. BIN
      namedropper/Assets/Sprites/OntologyWord_bg.png
  10. 123
      namedropper/Assets/Sprites/OntologyWord_bg.png.meta
  11. 8
      namedropper/Assets/_FortuneWheel/Scripts/FortuneWheel.cs
  12. 2
      namedropper/Assets/_FortuneWheel/Scripts/WheelPart.cs
  13. 3
      namedropper/ProjectSettings/EditorBuildSettings.asset

15
namedropper/Assets/OntologyGame.cs

@ -5,7 +5,8 @@ using UnityEngine;
public class OntologyGame : Level public class OntologyGame : Level
{ {
private float _timeToNextWord = 1f; private float _timeToNextWord = 1f;
private GameObject _wordPrefab; [SerializeField] GameObject _wordPrefab;
[SerializeField] Canvas _canvas;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
@ -24,12 +25,13 @@ public class OntologyGame : Level
void SpawnWord() void SpawnWord()
{ {
GameObject newWOrd = GameObject.Instantiate(_wordPrefab); GameObject newWord = GameObject.Instantiate(_wordPrefab);
newWord.transform.parent = _canvas.transform;
_timeToNextWord *= .9f; _timeToNextWord *= .99f;
_timeToNextWord = Mathf.Min(_timeToNextWord, .1f); _timeToNextWord = Mathf.Max(_timeToNextWord, .3f);
Invoke("SpawnWord", _timeToNextWord); Invoke("SpawnWord", _timeToNextWord);
} }
@ -39,7 +41,10 @@ public class OntologyGame : Level
foreach (GameObject playerGo in _players) foreach (GameObject playerGo in _players)
{ {
Player player = playerGo.GetComponent<Player>(); Player player = playerGo.GetComponent<Player>();
player.SetName(GameDataManager.Instance.GetRandomTopicData().Topic); TopicData topicData = GameDataManager.Instance.GetRandomTopicData();
player.OntologyTopicData = topicData;
player.SetName(topicData.Topic);
} }
} }

19
namedropper/Assets/OntologyWord.cs

@ -4,12 +4,31 @@ using UnityEngine;
public class OntologyWord : MonoBehaviour public class OntologyWord : MonoBehaviour
{ {
[SerializeField] TMPro.TextMeshProUGUI _text;
public CategoryData _categoryData;
// Start is called before the first frame update // Start is called before the first frame update
void Start() void Start()
{ {
} }
private void Awake()
{
Player[] players = FindObjectsOfType<Player>();
Player randomPlayer = players[Random.Range(0, players.Length)];
_categoryData = GameDataManager.Instance.GetRandomCategoryData(randomPlayer.OntologyTopicData, false);
_text.text = _categoryData.Category;
Vector2 margin = new Vector2(0f, 0f);
this.transform.position = new Vector3(Random.Range(margin.x, 1920f - margin.x), Random.Range(margin.y, 1080f - margin.y), transform.position.z);
SetRandomTextRotation();
}
void SetRandomTextRotation()
{
_text.gameObject.transform.eulerAngles = new Vector3(0f, 0f, Random.Range(-10f, 10f));
}
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {

149
namedropper/Assets/Prefabs/OntologyWord Prefab.prefab

@ -10,6 +10,9 @@ GameObject:
m_Component: m_Component:
- component: {fileID: 3175221214226580441} - component: {fileID: 3175221214226580441}
- component: {fileID: -7926489883287324733} - component: {fileID: -7926489883287324733}
- component: {fileID: 4846301646102100694}
- component: {fileID: 6860308520948842749}
- component: {fileID: 5952941301532674086}
m_Layer: 0 m_Layer: 0
m_Name: OntologyWord Prefab m_Name: OntologyWord Prefab
m_TagString: Untagged m_TagString: Untagged
@ -26,10 +29,11 @@ Transform:
m_GameObject: {fileID: 3665674534674050805} m_GameObject: {fileID: 3665674534674050805}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1} m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0} m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1} m_LocalScale: {x: 1.4, y: 1.4, z: 1}
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 139144834320043942} - {fileID: 139144834320043942}
- {fileID: 4468849727531685703}
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 0 m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@ -45,6 +49,149 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 4027171ca26eb5048ac80ece3558cdd2, type: 3} m_Script: {fileID: 11500000, guid: 4027171ca26eb5048ac80ece3558cdd2, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
_text: {fileID: 3508529014437474819}
_categoryData:
Category:
Elements: []
--- !u!50 &4846301646102100694
Rigidbody2D:
serializedVersion: 4
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3665674534674050805}
m_BodyType: 0
m_Simulated: 1
m_UseFullKinematicContacts: 0
m_UseAutoMass: 0
m_Mass: 0.5
m_LinearDrag: 4.05
m_AngularDrag: 0.05
m_GravityScale: 20
m_Material: {fileID: 0}
m_Interpolate: 0
m_SleepingMode: 1
m_CollisionDetection: 0
m_Constraints: 4
--- !u!114 &6860308520948842749
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3665674534674050805}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 37dfc580ad57d894caaababe502afb5b, type: 3}
m_Name:
m_EditorClassIdentifier:
_useWorldSpace: 0
--- !u!58 &5952941301532674086
CircleCollider2D:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3665674534674050805}
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: 62
--- !u!1 &4889193101875992752
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4468849727531685703}
- component: {fileID: 8668407686013339453}
m_Layer: 0
m_Name: sprite
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &4468849727531685703
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4889193101875992752}
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 83, y: 83, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 3175221214226580441}
m_RootOrder: 1
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 &8668407686013339453
SpriteRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4889193101875992752}
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: 3c63574e535edc34d8bcf1de05791dcb, 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 &7173398024643427538 --- !u!1 &7173398024643427538
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

253
namedropper/Assets/Scenes/Ontology.unity

@ -391,11 +391,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: -458 value: 69
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 339 value: 39
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
@ -942,7 +942,7 @@ RectTransform:
- {fileID: 1044471296} - {fileID: 1044471296}
- {fileID: 1237273639} - {fileID: 1237273639}
m_Father: {fileID: 1666960088} m_Father: {fileID: 1666960088}
m_RootOrder: 2 m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -1149,116 +1149,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} m_CorrespondingSourceObject: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3}
m_PrefabInstance: {fileID: 714773755} m_PrefabInstance: {fileID: 714773755}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &807489808
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1666960088}
m_Modifications:
- target: {fileID: 139144834320043942, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_SizeDelta.x
value: 110
objectReference: {fileID: 0}
- target: {fileID: 139144834320043942, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_SizeDelta.y
value: 110
objectReference: {fileID: 0}
- target: {fileID: 139144834320043942, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.z
value: 122.6
objectReference: {fileID: 0}
- target: {fileID: 139144834320043942, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.w
value: 0.9992014
objectReference: {fileID: 0}
- target: {fileID: 139144834320043942, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.z
value: -0.039957315
objectReference: {fileID: 0}
- target: {fileID: 139144834320043942, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_AnchoredPosition.y
value: 1.85
objectReference: {fileID: 0}
- target: {fileID: 139144834320043942, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: -4.58
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_RootOrder
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.x
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.y
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.z
value: -0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3508529014437474819, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_fontSize
value: 37.95
objectReference: {fileID: 0}
- target: {fileID: 3508529014437474819, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_fontColor.b
value: 0.5334767
objectReference: {fileID: 0}
- target: {fileID: 3508529014437474819, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_fontColor.g
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3508529014437474819, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_fontColor.r
value: 0.6698113
objectReference: {fileID: 0}
- target: {fileID: 3508529014437474819, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_fontColor32.rgba
value: 4287103147
objectReference: {fileID: 0}
- target: {fileID: 3665674534674050805, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_Name
value: OntologyWord Prefab
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
--- !u!4 &807489809 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
m_PrefabInstance: {fileID: 807489808}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &881809258 --- !u!1001 &881809258
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -1440,11 +1330,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: -618 value: -95
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 154 value: -128
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
@ -2338,7 +2228,7 @@ RectTransform:
- {fileID: 1152717270} - {fileID: 1152717270}
- {fileID: 994779495} - {fileID: 994779495}
m_Father: {fileID: 1666960088} m_Father: {fileID: 1666960088}
m_RootOrder: 3 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -2943,6 +2833,63 @@ Transform:
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_RootOrder: 2 m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &1308418707
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3665674534674050805, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_Name
value: OntologyWord Prefab
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
--- !u!1 &1391939818 --- !u!1 &1391939818
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2979,7 +2926,7 @@ RectTransform:
- {fileID: 1131047766} - {fileID: 1131047766}
- {fileID: 1217437522} - {fileID: 1217437522}
m_Father: {fileID: 1666960088} m_Father: {fileID: 1666960088}
m_RootOrder: 4 m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -3676,6 +3623,8 @@ MonoBehaviour:
Timer: {fileID: 1225785573} Timer: {fileID: 1225785573}
RoundNumber: {fileID: 924483020} RoundNumber: {fileID: 924483020}
Topic: {fileID: 0} Topic: {fileID: 0}
_wordPrefab: {fileID: 3665674534674050805, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
_canvas: {fileID: 1666960091}
--- !u!1 &1666960087 --- !u!1 &1666960087
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -3708,7 +3657,6 @@ RectTransform:
m_ConstrainProportionsScale: 0 m_ConstrainProportionsScale: 0
m_Children: m_Children:
- {fileID: 107001399} - {fileID: 107001399}
- {fileID: 807489809}
- {fileID: 554321083} - {fileID: 554321083}
- {fileID: 1146299635} - {fileID: 1146299635}
- {fileID: 1391939819} - {fileID: 1391939819}
@ -3940,7 +3888,7 @@ RectTransform:
- {fileID: 302674578} - {fileID: 302674578}
- {fileID: 1747069999} - {fileID: 1747069999}
m_Father: {fileID: 1666960088} m_Father: {fileID: 1666960088}
m_RootOrder: 5 m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -4335,7 +4283,7 @@ RectTransform:
- {fileID: 881809259} - {fileID: 881809259}
- {fileID: 2050475644} - {fileID: 2050475644}
m_Father: {fileID: 1666960088} m_Father: {fileID: 1666960088}
m_RootOrder: 6 m_RootOrder: 5
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
@ -4825,11 +4773,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: -615 value: -96
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 315 value: 37
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x
@ -4976,63 +4924,6 @@ Transform:
m_CorrespondingSourceObject: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3} m_CorrespondingSourceObject: {fileID: 1499098757095760799, guid: f3f23d9506e39c54cbd07779c62329a3, type: 3}
m_PrefabInstance: {fileID: 2090884023} m_PrefabInstance: {fileID: 2090884023}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1001 &1445199468395943343
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 0}
m_Modifications:
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_RootOrder
value: 6
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3175221214226580441, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3665674534674050805, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
propertyPath: m_Name
value: OntologyWord
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 309c95694517eca4cbbbeb1502a2182c, type: 3}
--- !u!1001 &1499098757172988272 --- !u!1001 &1499098757172988272
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -5315,11 +5206,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: -432 value: 69
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 185 value: -127
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3} - target: {fileID: 9049015333349338420, guid: 56b5ab1b6ee02794ab9664e282d1930a, type: 3}
propertyPath: m_LocalEulerAnglesHint.x propertyPath: m_LocalEulerAnglesHint.x

10
namedropper/Assets/Scenes/Wheel Scene.unity

@ -3279,11 +3279,11 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
prizes: prizes:
- Name Dropper - Name<br>Dropper
- Bumper Budz - Bumper<br>Budz 500
- Name Dropper - Ontology:<br>The Game
- Bumper Budz - Name<br>Dropper
- Bumper Budz - Bumper<br>Budz 500
tingSound: {fileID: 8300000, guid: a4094b6328f12884d8f174a320bff865, type: 3} tingSound: {fileID: 8300000, guid: a4094b6328f12884d8f174a320bff865, type: 3}
speedMultiplier: 4 speedMultiplier: 4
duration: 6 duration: 6

6
namedropper/Assets/Scripts/GameDataManager.cs

@ -36,13 +36,15 @@ public class GameDataManager {
return topicData; return topicData;
} }
public CategoryData GetRandomCategoryData(TopicData topicData) public CategoryData GetRandomCategoryData(TopicData topicData, bool removeFromTopic = true)
{ {
int categoryIndex = Random.Range(0, topicData.Categories.Count); int categoryIndex = Random.Range(0, topicData.Categories.Count);
CategoryData categoryData = topicData.Categories[categoryIndex]; CategoryData categoryData = topicData.Categories[categoryIndex];
topicData.Categories.RemoveAt(categoryIndex);
if (removeFromTopic)
topicData.Categories.RemoveAt(categoryIndex);
return categoryData; return categoryData;
} }

55
namedropper/Assets/Scripts/Player.cs

@ -40,6 +40,15 @@ public class Player : MonoBehaviour
float _powerupTimeLeft = 0f; float _powerupTimeLeft = 0f;
public Player PassInputOnto = null; public Player PassInputOnto = null;
int _laps = 0; int _laps = 0;
public TopicData OntologyTopicData;
float _stunTime = 0f;
public float StunTime{
get
{
return _stunTime;
}
}
public enum Team public enum Team
{ {
@ -375,6 +384,27 @@ public class Player : MonoBehaviour
} }
_touchedMidpoint = false; _touchedMidpoint = false;
} }
//ONTOLOGY GAME
OntologyWord ontologyWord = collision.gameObject.GetComponent<OntologyWord>();
if (ontologyWord != null)
{
if (OntologyTopicData.Categories.Contains(ontologyWord._categoryData))
{
GameObject.Destroy(ontologyWord.gameObject);
GameObject.FindObjectOfType<OntologyGame>().AddScore(1, _playerNumber);
}
else
{
float bounceStrength = 200f;
float wordBounceStrength = bounceStrength *.25f;
this._rigidbody.AddForce((transform.position - collision.gameObject.transform.position) * bounceStrength);
collision.gameObject.GetComponent<Rigidbody2D>().AddForce((collision.gameObject.transform.position - transform.position) * wordBounceStrength);
_stunTime = .4f;
}
}
} }
@ -417,6 +447,7 @@ public class Player : MonoBehaviour
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {
_stunTime -= Time.deltaTime;
if (Game.Paused) if (Game.Paused)
{ {
GameObject.Destroy(this.gameObject); GameObject.Destroy(this.gameObject);
@ -438,18 +469,20 @@ public class Player : MonoBehaviour
//_spriteChild.transform.Rotate(Vector3.forward); //_spriteChild.transform.Rotate(Vector3.forward);
if (_stunTime <= 0)
if (Input.GetKey(_keyLeft))
{
AddVelocity(new Vector2(_curSpeed * Time.deltaTime * -1f, 0f));
}
if (Input.GetKey(_keyRight))
{
AddVelocity(new Vector2(_curSpeed * Time.deltaTime, 0f));
}
if (Input.GetKey(_keyDown))
{ {
AddVelocity(new Vector2(0f, _curSpeed * Time.deltaTime * -1f)); if (Input.GetKey(_keyLeft))
{
AddVelocity(new Vector2(_curSpeed * Time.deltaTime * -1f, 0f));
}
if (Input.GetKey(_keyRight))
{
AddVelocity(new Vector2(_curSpeed * Time.deltaTime, 0f));
}
if (Input.GetKey(_keyDown))
{
AddVelocity(new Vector2(0f, _curSpeed * Time.deltaTime * -1f));
}
} }
if (Input.GetKey(_keyDrop) && ALLOW_DROP) if (Input.GetKey(_keyDrop) && ALLOW_DROP)

5
namedropper/Assets/Scripts/TrackballInputManager.cs

@ -172,7 +172,10 @@ public class TrackballInputManager : MonoBehaviour
//player.transform.position = new Vector2(player.transform.position.x + dx, player.transform.position.y - dy); //player.transform.position = new Vector2(player.transform.position.x + dx, player.transform.position.y - dy);
//use this method to move using velocity //use this method to move using velocity
player.AddVelocity(new Vector2(dx, -dy)); if (player.StunTime <= 0)
{
player.AddVelocity(new Vector2(dx, -dy));
}
} }
else else
{ {

BIN
namedropper/Assets/Sprites/OntologyWord_bg.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 3.4 KiB

123
namedropper/Assets/Sprites/OntologyWord_bg.png.meta

@ -0,0 +1,123 @@
fileFormatVersion: 2
guid: 3c63574e535edc34d8bcf1de05791dcb
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: 100
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:

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

@ -150,11 +150,11 @@
string sceneName = ""; string sceneName = "";
if (_gameName == "Name Dropper") if (_gameName.Contains("Dropper"))
{ {
sceneName = "TopicSelect"; sceneName = "TopicSelect";
} }
else if (_gameName == "Indie 500" || _gameName == "Bumper Budz") else if (_gameName == "Indie 500" || _gameName.Contains("Bumper"))
{ {
sceneName = "RaceGame"; sceneName = "RaceGame";
} }
@ -162,6 +162,10 @@
{ {
sceneName = "RaceGame"; sceneName = "RaceGame";
} }
else if (_gameName.Contains("Ontology"))
{
sceneName = "OntologyGame";
}
else else
{ {
Debug.LogError("unknown game name: " + _gameName); Debug.LogError("unknown game name: " + _gameName);

2
namedropper/Assets/_FortuneWheel/Scripts/WheelPart.cs

@ -10,7 +10,7 @@
void Start() void Start()
{ {
myIndex = transform.GetSiblingIndex(); myIndex = transform.GetSiblingIndex();
valueText.text = FortuneWheelConfig.Instance.prizes[myIndex].ToString(); valueText.text = FortuneWheelConfig.Instance.prizes[myIndex].ToString().Replace("<br>","\n");
} }
void OnTriggerEnter2D(Collider2D other) void OnTriggerEnter2D(Collider2D other)
{ {

3
namedropper/ProjectSettings/EditorBuildSettings.asset

@ -26,6 +26,9 @@ EditorBuildSettings:
- enabled: 1 - enabled: 1
path: Assets/Scenes/Title.unity path: Assets/Scenes/Title.unity
guid: dec16e3b1be4d704a89f82efa59198e4 guid: dec16e3b1be4d704a89f82efa59198e4
- enabled: 1
path: Assets/Scenes/Ontology.unity
guid: ec616c0f27b0f8845836f55d5173b152
- enabled: 0 - enabled: 0
path: path:
guid: 00000000000000000000000000000000 guid: 00000000000000000000000000000000

Loading…
Cancel
Save