Browse Source

starting point of Ontology game after returning from Peru

combinedRaceAndNameDropper
Josh 1 year ago
parent
commit
0513e9248c
  1. 56
      namedropper/Assets/OntologyGame.cs
  2. 11
      namedropper/Assets/OntologyGame.cs.meta
  3. 18
      namedropper/Assets/OntologyWord.cs
  4. 11
      namedropper/Assets/OntologyWord.cs.meta
  5. 182
      namedropper/Assets/Prefabs/OntologyWord Prefab.prefab
  6. 7
      namedropper/Assets/Prefabs/OntologyWord Prefab.prefab.meta
  7. 5337
      namedropper/Assets/Scenes/Ontology.unity
  8. 7
      namedropper/Assets/Scenes/Ontology.unity.meta
  9. 10
      namedropper/Assets/Scripts/Level.cs
  10. 2
      namedropper/Assets/Scripts/Wraparound.cs

56
namedropper/Assets/OntologyGame.cs

@ -0,0 +1,56 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class OntologyGame : Level
{
private float _timeToNextWord = 1f;
private GameObject _wordPrefab;
// Start is called before the first frame update
void Start()
{
Physics2D.gravity = Vector2.zero;
base.Start();
//AssignTopicsToPlayers();
}
protected override void PostStartupProcess()
{
AssignTopicsToPlayers();
SpawnWord();
}
void SpawnWord()
{
GameObject newWOrd = GameObject.Instantiate(_wordPrefab);
_timeToNextWord *= .9f;
_timeToNextWord = Mathf.Min(_timeToNextWord, .1f);
Invoke("SpawnWord", _timeToNextWord);
}
void AssignTopicsToPlayers()
{
foreach (GameObject playerGo in _players)
{
Player player = playerGo.GetComponent<Player>();
player.SetName(GameDataManager.Instance.GetRandomTopicData().Topic);
}
}
private void Awake()
{
base.Awake();
}
// Update is called once per frame
void Update()
{
base.Update();
}
}

11
namedropper/Assets/OntologyGame.cs.meta

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

18
namedropper/Assets/OntologyWord.cs

@ -0,0 +1,18 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class OntologyWord : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
}
// Update is called once per frame
void Update()
{
}
}

11
namedropper/Assets/OntologyWord.cs.meta

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

182
namedropper/Assets/Prefabs/OntologyWord Prefab.prefab

@ -0,0 +1,182 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3665674534674050805
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3175221214226580441}
- component: {fileID: -7926489883287324733}
m_Layer: 0
m_Name: OntologyWord Prefab
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3175221214226580441
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3665674534674050805}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 139144834320043942}
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &-7926489883287324733
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: 4027171ca26eb5048ac80ece3558cdd2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &7173398024643427538
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 139144834320043942}
- component: {fileID: 3391622064310201916}
- component: {fileID: 3508529014437474819}
m_Layer: 0
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &139144834320043942
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7173398024643427538}
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: 3175221214226580441}
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!222 &3391622064310201916
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7173398024643427538}
m_CullTransparentMesh: 1
--- !u!114 &3508529014437474819
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7173398024643427538}
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: Pink Floyd
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: 4287103147
m_fontColor: {r: 0.6698113, g: 0, b: 0.5334767, 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: 37.95
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}

7
namedropper/Assets/Prefabs/OntologyWord Prefab.prefab.meta

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

5337
namedropper/Assets/Scenes/Ontology.unity

File diff suppressed because it is too large

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

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

10
namedropper/Assets/Scripts/Level.cs

@ -69,9 +69,15 @@ public class Level : MonoBehaviour
yield return new WaitForSeconds(1f);
if (Topic != null)
Topic.gameObject.SetActive(false);
PostStartupProcess();
//Invoke("SpawnPowerup", Random.Range(8f, 12f));
}
protected virtual void PostStartupProcess()
{
}
// Update is called once per frame
public void Update()
{
@ -100,7 +106,9 @@ public class Level : MonoBehaviour
foreach (GameObject player in _players)
{
if (GameManager.Instance.PlayerJoined[player.GetComponent<Player>()._playerNumber] == true ||
SceneManager.GetActiveScene().name == "Title")
SceneManager.GetActiveScene().name == "Title" ||
SceneManager.GetActiveScene().name == "Ontology"
)
{
player.SetActive(true);
}

2
namedropper/Assets/Scripts/Wraparound.cs

@ -31,7 +31,7 @@ public class Wraparound : MonoBehaviour
return;
}
if (SceneManager.GetActiveScene().name == "TopicSelect" || SceneManager.GetActiveScene().name == "Calibration" || SceneManager.GetActiveScene().name == "Title" || SceneManager.GetActiveScene().name == "GameOver" || SceneManager.GetActiveScene().name == "ChallengingStage")
if (SceneManager.GetActiveScene().name == "TopicSelect" || SceneManager.GetActiveScene().name == "Calibration" || SceneManager.GetActiveScene().name == "Title" || SceneManager.GetActiveScene().name == "GameOver" || SceneManager.GetActiveScene().name == "ChallengingStage" || SceneManager.GetActiveScene().name == "Ontology")
{
if (this.transform.position.x < 0)
{

Loading…
Cancel
Save