1
Fork 0
mirror of https://github.com/Steffo99/better-tee.git synced 2024-11-24 00:04:19 +00:00

Add typing mode

This commit is contained in:
Steffo 2019-09-11 19:46:01 +02:00
parent b4955cd27a
commit 08671a24b5
38 changed files with 972 additions and 45 deletions

View file

@ -0,0 +1,16 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class GameController : MonoBehaviour
{
void Start()
{
}
void Update()
{
}
}

View file

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

View file

@ -302,12 +302,6 @@ RectTransform:
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0, y: 0}
--- !u!4 &781296762 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
type: 3}
m_PrefabInstance: {fileID: 3241962965509540481}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1207901189
GameObject:
m_ObjectHideFlags: 0
@ -321,7 +315,7 @@ GameObject:
- component: {fileID: 1207901190}
m_Layer: 0
m_Name: EventSystem
m_TagString: Untagged
m_TagString: EventSystem
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
@ -374,6 +368,12 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!4 &1499784724 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
m_PrefabInstance: {fileID: 2942172270378248008}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1832035424
GameObject:
m_ObjectHideFlags: 0
@ -401,82 +401,86 @@ Transform:
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children:
- {fileID: 781296762}
- {fileID: 1499784724}
m_Father: {fileID: 0}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &3241962965509540481
--- !u!1001 &2942172270378248008
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
m_TransformParent: {fileID: 1832035425}
m_Modifications:
- target: {fileID: 3241962964773812264, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964315, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_Name
value: Drawing Controller
value: Typing Manager
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalRotation.x
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalRotation.y
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalRotation.z
value: -0
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_RootOrder
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812267, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964316, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3241962964773812269, guid: 4fd713402edcc1c43b82d4d86a713998,
- target: {fileID: 2942172269146964317, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: jsonString
value: '{"startingColor":{"r":1.0,"g":1.0,"b":1.0,"a":1.0},"palette":[{"r":1.0,"g":0.0,"b":0.0,"a":1.0},{"r":1.0,"g":1.0,"b":0.0,"a":1.0},{"r":0.0,"g":1.0,"b":0.0,"a":1.0},{"r":0.0,"g":1.0,"b":1.0,"a":1.0},{"r":0.0,"g":0.0,"b":1.0,"a":1.0},{"r":1.0,"g":0.0,"b":1.0,"a":1.0},{"r":1.0,"g":1.0,"b":1.0,"a":1.0}],"timeLimit":5.0,"actName":"RAINBOWS","actDescription":"Disegna
qualcosa con questi colori superluminosi!"}'
propertyPath: settings.actName
value: Fase degli slogan
objectReference: {fileID: 0}
- target: {fileID: 2942172269146964317, guid: d91131f9599079b4d96bfefa29d77a3a,
type: 3}
propertyPath: settings.actDescription
value: Scrivi tutti gli slogan che puoi!
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 4fd713402edcc1c43b82d4d86a713998, type: 3}
m_SourcePrefab: {fileID: 100100000, guid: d91131f9599079b4d96bfefa29d77a3a, type: 3}

View file

@ -1,5 +1,5 @@
fileFormatVersion: 2
guid: 034dca9b3427d3c43be44c9c652b2816
guid: aac4f8ad03c89d544a8b2ec8d8bc84d6
folderAsset: yes
DefaultImporter:
externalObjects: {}

View file

@ -33,9 +33,9 @@ RectTransform:
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 19.97461, y: -212}
m_SizeDelta: {x: 1000, y: 204}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 12, y: -212}
m_SizeDelta: {x: -24, y: 204}
m_Pivot: {x: 0, y: 1}
--- !u!222 &7083582236406838684
CanvasRenderer:
@ -76,5 +76,4 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Long act description, the boring one, where the game tells you things you
don't care about
m_Text: ACT_DESCRIPTION

View file

@ -34,8 +34,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 19.97461, y: -12}
m_SizeDelta: {x: 800, y: 200}
m_AnchoredPosition: {x: 12, y: -12}
m_SizeDelta: {x: 856.25, y: 200}
m_Pivot: {x: 0, y: 1}
--- !u!222 &5201592901269269098
CanvasRenderer:
@ -76,4 +76,4 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Act Name
m_Text: ACT_NAME

View file

@ -78,7 +78,7 @@ MonoBehaviour:
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 99
m_Text: XX
--- !u!114 &5444294768605868681
MonoBehaviour:
m_ObjectHideFlags: 0
@ -93,8 +93,6 @@ MonoBehaviour:
m_EditorClassIdentifier:
startingTime: 0
time: 0
isTriggered: 0
isRunning: 0
--- !u!114 &8159594153790644181
MonoBehaviour:
m_ObjectHideFlags: 0

View file

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

View file

@ -89,12 +89,12 @@ public class DrawingManager : MonoBehaviour
ActStart();
}
void ActStart() {
protected void ActStart() {
timer.TimerStart();
drawableFrame.locked = false;
}
void ActEnd(object sender, EventArgs e) {
protected void ActEnd(object sender, EventArgs e) {
drawableFrame.locked = true;
png = drawableFrame.ToPNG();
}

8
Assets/Matching.meta Normal file
View file

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

8
Assets/Typing.meta Normal file
View file

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

View file

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

View file

@ -0,0 +1,310 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &549540992562893914
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 549540992562893913}
- component: {fileID: 549540992562893918}
- component: {fileID: 549540992562893919}
- component: {fileID: -1663395819870050635}
- component: {fileID: 821657329760485467}
m_Layer: 5
m_Name: Input Field
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &549540992562893913
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540992562893914}
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_Children:
- {fileID: 549540993945336865}
- {fileID: 549540993676942829}
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: 0, y: 320}
m_SizeDelta: {x: 1024, y: 400}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &549540992562893918
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540992562893914}
m_CullTransparentMesh: 0
--- !u!114 &549540992562893919
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540992562893914}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10911, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &-1663395819870050635
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540992562893914}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: d199490a83bb2b844b9695cbf13b01ef, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: 3
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.1
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 549540992562893919}
m_TextComponent: {fileID: 549540993676942828}
m_Placeholder: {fileID: 549540993945336864}
m_ContentType: 0
m_InputType: 0
m_AsteriskChar: 42
m_KeyboardType: 0
m_LineType: 2
m_HideMobileInput: 1
m_CharacterValidation: 0
m_CharacterLimit: 0
m_OnEndEdit:
m_PersistentCalls:
m_Calls: []
m_OnValueChanged:
m_PersistentCalls:
m_Calls: []
m_CaretColor: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_CustomCaretColor: 0
m_SelectionColor: {r: 0.65882355, g: 0.80784315, b: 1, a: 0.7529412}
m_Text:
m_CaretBlinkRate: 0.85
m_CaretWidth: 5
m_ReadOnly: 0
--- !u!114 &821657329760485467
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540992562893914}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9492cbabfa0ad354fb6fadbc86f023e0, type: 3}
m_Name:
m_EditorClassIdentifier:
inputField: {fileID: 0}
typingManager: {fileID: 0}
--- !u!1 &549540993676942830
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 549540993676942829}
- component: {fileID: 549540993676942835}
- component: {fileID: 549540993676942828}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &549540993676942829
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540993676942830}
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_Children: []
m_Father: {fileID: 549540992562893913}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.5}
m_SizeDelta: {x: -20, y: -13}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &549540993676942835
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540993676942830}
m_CullTransparentMesh: 0
--- !u!114 &549540993676942828
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540993676942830}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 64
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 6
m_MaxSize: 64
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 0
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text:
--- !u!1 &549540993945336866
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 549540993945336865}
- component: {fileID: 549540993945336871}
- component: {fileID: 549540993945336864}
m_Layer: 5
m_Name: Placeholder
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &549540993945336865
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540993945336866}
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_Children: []
m_Father: {fileID: 549540992562893913}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: -0.5}
m_SizeDelta: {x: -20, y: -13}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &549540993945336871
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540993945336866}
m_CullTransparentMesh: 0
--- !u!114 &549540993945336864
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 549540993945336866}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 0.5}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 64
m_FontStyle: 2
m_BestFit: 0
m_MinSize: 6
m_MaxSize: 177
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Type something here!

View file

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

View file

@ -0,0 +1,223 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2074529559843646469
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2074529559843646466}
- component: {fileID: 2074529559843646465}
- component: {fileID: 2074529559843646464}
- component: {fileID: 2074529559843646467}
- component: {fileID: 7956375708752854935}
m_Layer: 5
m_Name: Submit
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2074529559843646466
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074529559843646469}
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_Children:
- {fileID: 2074529560286136296}
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: 0, y: -2}
m_SizeDelta: {x: 1024, y: 196}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2074529559843646465
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074529559843646469}
m_CullTransparentMesh: 0
--- !u!114 &2074529559843646464
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074529559843646469}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: fe87c0e1cc204ed48ad3b37840f39efc, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_Sprite: {fileID: 10905, guid: 0000000000000000f000000000000000, type: 0}
m_Type: 1
m_PreserveAspect: 0
m_FillCenter: 1
m_FillMethod: 4
m_FillAmount: 1
m_FillClockwise: 1
m_FillOrigin: 0
m_UseSpriteMesh: 0
m_PixelsPerUnitMultiplier: 1
--- !u!114 &2074529559843646467
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074529559843646469}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 4e29b1a8efbd4b44bb3f3716e73f07ff, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Navigation:
m_Mode: -1
m_SelectOnUp: {fileID: 0}
m_SelectOnDown: {fileID: 0}
m_SelectOnLeft: {fileID: 0}
m_SelectOnRight: {fileID: 0}
m_Transition: 1
m_Colors:
m_NormalColor: {r: 1, g: 1, b: 1, a: 1}
m_HighlightedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_PressedColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 1}
m_SelectedColor: {r: 0.9607843, g: 0.9607843, b: 0.9607843, a: 1}
m_DisabledColor: {r: 0.78431374, g: 0.78431374, b: 0.78431374, a: 0.5019608}
m_ColorMultiplier: 1
m_FadeDuration: 0.05
m_SpriteState:
m_HighlightedSprite: {fileID: 0}
m_PressedSprite: {fileID: 0}
m_SelectedSprite: {fileID: 0}
m_DisabledSprite: {fileID: 0}
m_AnimationTriggers:
m_NormalTrigger: Normal
m_HighlightedTrigger: Highlighted
m_PressedTrigger: Pressed
m_SelectedTrigger: Selected
m_DisabledTrigger: Disabled
m_Interactable: 1
m_TargetGraphic: {fileID: 2074529559843646464}
m_OnClick:
m_PersistentCalls:
m_Calls:
- m_Target: {fileID: 7956375708752854935}
m_MethodName: OnClick
m_Mode: 1
m_Arguments:
m_ObjectArgument: {fileID: 0}
m_ObjectArgumentAssemblyTypeName: UnityEngine.Object, UnityEngine
m_IntArgument: 0
m_FloatArgument: 0
m_StringArgument:
m_BoolArgument: 0
m_CallState: 2
--- !u!114 &7956375708752854935
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074529559843646469}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9492cbabfa0ad354fb6fadbc86f023e0, type: 3}
m_Name:
m_EditorClassIdentifier:
inputField: {fileID: 0}
typingManager: {fileID: 0}
--- !u!1 &2074529560286136299
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2074529560286136296}
- component: {fileID: 2074529560286136310}
- component: {fileID: 2074529560286136297}
m_Layer: 5
m_Name: Text
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2074529560286136296
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074529560286136299}
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_Children: []
m_Father: {fileID: 2074529559843646466}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_SizeDelta: {x: 0, y: 0}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &2074529560286136310
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074529560286136299}
m_CullTransparentMesh: 0
--- !u!114 &2074529560286136297
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2074529560286136299}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 64
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 6
m_MaxSize: 64
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: Submit

View file

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

View file

@ -0,0 +1,79 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3217623250842909506
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3217623250842909505}
- component: {fileID: 3217623250842909511}
- component: {fileID: 3217623250842909504}
m_Layer: 5
m_Name: Submitted Count
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &3217623250842909505
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3217623250842909506}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0.5}
m_AnchorMax: {x: 1, y: 0.5}
m_AnchoredPosition: {x: 0, y: -168}
m_SizeDelta: {x: -24, y: 96}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &3217623250842909511
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3217623250842909506}
m_CullTransparentMesh: 0
--- !u!114 &3217623250842909504
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3217623250842909506}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5f7201a12d95ffc409449d95f23cf332, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 45
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 0
m_MaxSize: 64
m_Alignment: 4
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Submitted: X'

View file

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

View file

@ -0,0 +1,63 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &2942172269146964315
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2942172269146964316}
- component: {fileID: 2942172269146964317}
m_Layer: 0
m_Name: Typing Manager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2942172269146964316
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2942172269146964315}
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_Children: []
m_Father: {fileID: 0}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2942172269146964317
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2942172269146964315}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5dbc4b750b147b5419efe58851f05145, type: 3}
m_Name:
m_EditorClassIdentifier:
jsonString:
settings:
timeLimit: 99
actName: Untitled
actDescription: This Act is missing a description.
actNamePrefab: {fileID: 5201592901269269097, guid: 303cf7d85a1269245a58347705a275b0,
type: 3}
actDescriptionPrefab: {fileID: 7083582236406838683, guid: 13cfb8f4345bdcb459f2dd90ac554850,
type: 3}
timerPrefab: {fileID: 8049216009855113645, guid: 2ecb10bfea7885e40ad4340fa7eaa265,
type: 3}
inputFieldPrefab: {fileID: 549540992562893914, guid: 90fda1ed55ff7b741bfe9dbc5f9003d8,
type: 3}
submitPrefab: {fileID: 2074529559843646469, guid: c55ca4759b513f34f823478efced5cb4,
type: 3}
submittedCountPrefab: {fileID: 3217623250842909506, guid: ea05f9737b8776c4faf05bf53c37b4b9,
type: 3}
texts: []

View file

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

View file

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

View file

@ -0,0 +1,23 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
public class Submit : MonoBehaviour
{
public InputField inputField;
public TypingManager typingManager;
protected EventSystem eventSystem;
protected void Start() {
eventSystem = GameObject.FindGameObjectWithTag("EventSystem").GetComponent<EventSystem>();
}
public void OnClick() {
typingManager.SubmitText(inputField.text);
inputField.text = "";
eventSystem.SetSelectedGameObject(inputField.gameObject);
}
}

View file

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

View file

@ -0,0 +1,98 @@
using System;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using UnityEngine.EventSystems;
[Serializable]
public class TypingSettings {
public float timeLimit = 99f;
public string actName = "Untitled";
public string actDescription = "This Act is missing a description.";
}
public class TypingManager : MonoBehaviour
{
[Header("Settings")]
public string jsonString = "";
public TypingSettings settings = null;
[Header("Prefabs")]
public GameObject actNamePrefab;
public GameObject actDescriptionPrefab;
public GameObject timerPrefab;
public GameObject inputFieldPrefab;
public GameObject submitPrefab;
public GameObject submittedCountPrefab;
[Header("Objects")]
protected Text actName;
protected Text actDescription;
protected Timer timer;
protected Canvas canvas;
protected InputField inputField;
protected Submit submit;
protected Text submittedCount;
protected EventSystem eventSystem;
[Header("Results")]
public List<string> texts;
protected void Start() {
if(jsonString != "") {
JsonUtility.FromJsonOverwrite(jsonString, settings);
if(settings == null) {
Debug.LogWarning("Invalid settings json string, using defaults.");
}
}
else {
Debug.Log(JsonUtility.ToJson(settings));
}
texts = new List<string>();
canvas = GameObject.FindGameObjectWithTag("Canvas").GetComponent<Canvas>();
eventSystem = GameObject.FindGameObjectWithTag("EventSystem").GetComponent<EventSystem>();
actName = Instantiate(actNamePrefab, canvas.transform).GetComponent<Text>();
actName.text = settings.actName;
actDescription = Instantiate(actDescriptionPrefab, canvas.transform).GetComponent<Text>();
actDescription.text = settings.actDescription;
timer = Instantiate(timerPrefab, canvas.transform).GetComponent<Timer>();
timer.TimerSet(settings.timeLimit);
timer.OnTimeOut += ActEnd;
inputField = Instantiate(inputFieldPrefab, canvas.transform).GetComponent<InputField>();
Submit inputFieldSubmit = inputField.GetComponent<Submit>();
inputFieldSubmit.typingManager = this;
inputFieldSubmit.inputField = inputField;
submit = Instantiate(submitPrefab, canvas.transform).GetComponent<Submit>();
submit.typingManager = this;
submit.inputField = inputField;
submittedCount = Instantiate(submittedCountPrefab, canvas.transform).GetComponent<Text>();
submittedCount.text = "";
ActStart();
}
protected void ActStart() {
timer.TimerStart();
eventSystem.SetSelectedGameObject(inputField.gameObject);
}
protected void ActEnd(object sender, EventArgs e) {
inputField.enabled = false;
submit.enabled = false;
}
public void SubmitText(string text) {
if(text != "") {
texts.Add(text);
submittedCount.text = String.Format("Submitted: {0}", texts.Count);
}
}
}

View file

@ -0,0 +1,23 @@
fileFormatVersion: 2
guid: 5dbc4b750b147b5419efe58851f05145
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences:
- actNamePrefab: {fileID: 5201592901269269097, guid: 303cf7d85a1269245a58347705a275b0,
type: 3}
- actDescriptionPrefab: {fileID: 7083582236406838683, guid: 13cfb8f4345bdcb459f2dd90ac554850,
type: 3}
- timerPrefab: {fileID: 8049216009855113645, guid: 2ecb10bfea7885e40ad4340fa7eaa265,
type: 3}
- inputFieldPrefab: {fileID: 549540992562893914, guid: 90fda1ed55ff7b741bfe9dbc5f9003d8,
type: 3}
- submitPrefab: {fileID: 2074529559843646469, guid: c55ca4759b513f34f823478efced5cb4,
type: 3}
- submittedCountPrefab: {fileID: 3217623250842909506, guid: ea05f9737b8776c4faf05bf53c37b4b9,
type: 3}
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -6,6 +6,6 @@ EditorBuildSettings:
serializedVersion: 2
m_Scenes:
- enabled: 1
path: Assets/SampleScene.unity
path: Assets/Common/Main.unity
guid: 2cda990e2423bbf4892e6590ba056729
m_configObjects: {}

View file

@ -5,6 +5,7 @@ TagManager:
serializedVersion: 2
tags:
- Canvas
- EventSystem
layers:
- Default
- TransparentFX