Josh
2 years ago
10 changed files with 5639 additions and 2 deletions
@ -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(); |
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 9383f872ed3906f4fae5a0433d6cf1ee |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
@ -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() |
|||
{ |
|||
|
|||
} |
|||
} |
@ -0,0 +1,11 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 4027171ca26eb5048ac80ece3558cdd2 |
|||
MonoImporter: |
|||
externalObjects: {} |
|||
serializedVersion: 2 |
|||
defaultReferences: [] |
|||
executionOrder: 0 |
|||
icon: {instanceID: 0} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
@ -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} |
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: 309c95694517eca4cbbbeb1502a2182c |
|||
PrefabImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
File diff suppressed because it is too large
@ -0,0 +1,7 @@ |
|||
fileFormatVersion: 2 |
|||
guid: ec616c0f27b0f8845836f55d5173b152 |
|||
DefaultImporter: |
|||
externalObjects: {} |
|||
userData: |
|||
assetBundleName: |
|||
assetBundleVariant: |
Loading…
Reference in new issue