Question board

This commit is contained in:
unknown
2017-05-18 10:29:14 +02:00
parent 3557b21971
commit 2a365fa365
2 changed files with 269 additions and 37 deletions

View File

@@ -213,6 +213,8 @@ RectTransform:
- {fileID: 1104804434}
- {fileID: 958520059}
- {fileID: 697668434}
- {fileID: 573708415}
- {fileID: 2053806158}
m_Father: {fileID: 0}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -253,8 +255,8 @@ RectTransform:
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: 160, y: 30}
m_AnchoredPosition: {x: 10, y: 100}
m_SizeDelta: {x: 370, y: 50}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &104311976
MonoBehaviour:
@@ -277,16 +279,16 @@ MonoBehaviour:
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: ea60ddb36cd742f43afccf15d3ffe272, type: 3}
m_FontSize: 14
m_FontSize: 25
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MinSize: 1
m_MaxSize: 40
m_Alignment: 4
m_Alignment: 1
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_VerticalOverflow: 1
m_LineSpacing: 1
m_Text: Question Text
--- !u!222 &104311977
@@ -479,7 +481,7 @@ Transform:
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 478263766}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: -20}
m_LocalPosition: {x: 0, y: 10, z: -20}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
@@ -509,6 +511,80 @@ MonoBehaviour:
scoreText: {fileID: 1104804435}
questionText: {fileID: 104311976}
btnNextQuestion: {fileID: 697668435}
--- !u!1 &573708414
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 573708415}
- component: {fileID: 573708417}
- component: {fileID: 573708416}
m_Layer: 5
m_Name: CounterTitle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &573708415
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 573708414}
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: 84787048}
m_RootOrder: 4
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: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &573708416
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 573708414}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.25882354, g: 0.42352942, b: 0.93333334, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: ea60ddb36cd742f43afccf15d3ffe272, type: 3}
m_FontSize: 25
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Vrijeme:'
--- !u!222 &573708417
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 573708414}
--- !u!1 &626064647 stripped
GameObject:
m_PrefabParentObject: {fileID: 100000, guid: 837f99c7bbda2264ea0a126359145ccb, type: 3}
@@ -651,7 +727,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!65 &716286976
BoxCollider:
m_ObjectHideFlags: 0
@@ -857,11 +933,11 @@ RectTransform:
m_Father: {fileID: 84787048}
m_RootOrder: 2
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 1, y: 1}
m_AnchorMax: {x: 1, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 75, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 1, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &958520060
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -874,7 +950,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_Color: {r: 1, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -882,19 +958,19 @@ MonoBehaviour:
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_Font: {fileID: 12800000, guid: ea60ddb36cd742f43afccf15d3ffe272, type: 3}
m_FontSize: 25
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Counter: 90'
m_Text: 90
--- !u!222 &958520061
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -931,11 +1007,11 @@ RectTransform:
m_Father: {fileID: 84787048}
m_RootOrder: 1
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1}
m_AnchorMax: {x: 0, y: 1}
m_AnchoredPosition: {x: 0, y: 0}
m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 118, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0, y: 1}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &1104804435
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -948,7 +1024,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.19607843, g: 0.19607843, b: 0.19607843, a: 1}
m_Color: {r: 1, g: 0, b: 0, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
@@ -956,19 +1032,19 @@ MonoBehaviour:
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 10102, guid: 0000000000000000e000000000000000, type: 0}
m_FontSize: 14
m_Font: {fileID: 12800000, guid: ea60ddb36cd742f43afccf15d3ffe272, type: 3}
m_FontSize: 25
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 10
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 4
m_Alignment: 1
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Score: 0'
m_Text: 650
--- !u!222 &1104804436
CanvasRenderer:
m_ObjectHideFlags: 0
@@ -1536,6 +1612,88 @@ BoxCollider:
serializedVersion: 2
m_Size: {x: 10, y: 20, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1 &1727113070
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 1727113074}
- component: {fileID: 1727113073}
- component: {fileID: 1727113072}
- component: {fileID: 1727113071}
m_Layer: 0
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!23 &1727113071
MeshRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1727113070}
m_Enabled: 1
m_CastShadows: 1
m_ReceiveShadows: 1
m_MotionVectors: 1
m_LightProbeUsage: 1
m_ReflectionProbeUsage: 1
m_Materials:
- {fileID: 10303, 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_PreserveUVs: 1
m_IgnoreNormalsForChartDetection: 0
m_ImportantGI: 0
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
--- !u!65 &1727113072
BoxCollider:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1727113070}
m_Material: {fileID: 0}
m_IsTrigger: 0
m_Enabled: 1
serializedVersion: 2
m_Size: {x: 1, y: 1, z: 1}
m_Center: {x: 0, y: 0, z: 0}
--- !u!33 &1727113073
MeshFilter:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1727113070}
m_Mesh: {fileID: 4300002, guid: 153c7c3363d51a9439069414442f515c, type: 3}
--- !u!4 &1727113074
Transform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 1727113070}
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: 14
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1791996079
GameObject:
m_ObjectHideFlags: 0
@@ -1665,6 +1823,80 @@ Transform:
m_Father: {fileID: 0}
m_RootOrder: 4
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &2053806157
GameObject:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
serializedVersion: 5
m_Component:
- component: {fileID: 2053806158}
- component: {fileID: 2053806160}
- component: {fileID: 2053806159}
m_Layer: 5
m_Name: ScoreTitle
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &2053806158
RectTransform:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2053806157}
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: 84787048}
m_RootOrder: 5
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: 110, y: 0}
m_SizeDelta: {x: 160, y: 30}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!114 &2053806159
MonoBehaviour:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2053806157}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 708705254, guid: f70555f144d8491a825f0804e09c671c, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0.77114886, g: 0.07461075, b: 0.8455882, a: 1}
m_RaycastTarget: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_TypeName: UnityEngine.UI.MaskableGraphic+CullStateChangedEvent, UnityEngine.UI,
Version=1.0.0.0, Culture=neutral, PublicKeyToken=null
m_FontData:
m_Font: {fileID: 12800000, guid: ea60ddb36cd742f43afccf15d3ffe272, type: 3}
m_FontSize: 25
m_FontStyle: 0
m_BestFit: 0
m_MinSize: 2
m_MaxSize: 40
m_Alignment: 0
m_AlignByGeometry: 0
m_RichText: 1
m_HorizontalOverflow: 0
m_VerticalOverflow: 0
m_LineSpacing: 1
m_Text: 'Bodovi:'
--- !u!222 &2053806160
CanvasRenderer:
m_ObjectHideFlags: 0
m_PrefabParentObject: {fileID: 0}
m_PrefabInternal: {fileID: 0}
m_GameObject: {fileID: 2053806157}
--- !u!1001 &2057652684
Prefab:
m_ObjectHideFlags: 0
@@ -1728,7 +1960,7 @@ Prefab:
m_Modifications:
- target: {fileID: 400036, guid: 153c7c3363d51a9439069414442f515c, type: 3}
propertyPath: m_LocalPosition.x
value: 15.5
value: -15
objectReference: {fileID: 0}
- target: {fileID: 400036, guid: 153c7c3363d51a9439069414442f515c, type: 3}
propertyPath: m_LocalPosition.y
@@ -1736,7 +1968,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 400036, guid: 153c7c3363d51a9439069414442f515c, type: 3}
propertyPath: m_LocalPosition.z
value: 20
value: 5
objectReference: {fileID: 0}
- target: {fileID: 400036, guid: 153c7c3363d51a9439069414442f515c, type: 3}
propertyPath: m_LocalRotation.x
@@ -1744,7 +1976,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 400036, guid: 153c7c3363d51a9439069414442f515c, type: 3}
propertyPath: m_LocalRotation.y
value: 1
value: 0
objectReference: {fileID: 0}
- target: {fileID: 400036, guid: 153c7c3363d51a9439069414442f515c, type: 3}
propertyPath: m_LocalRotation.z
@@ -1752,7 +1984,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 400036, guid: 153c7c3363d51a9439069414442f515c, type: 3}
propertyPath: m_LocalRotation.w
value: 0
value: 1
objectReference: {fileID: 0}
- target: {fileID: 400036, guid: 153c7c3363d51a9439069414442f515c, type: 3}
propertyPath: m_RootOrder
@@ -1760,7 +1992,7 @@ Prefab:
objectReference: {fileID: 0}
- target: {fileID: 400036, guid: 153c7c3363d51a9439069414442f515c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_ParentPrefab: {fileID: 100100000, guid: 153c7c3363d51a9439069414442f515c, type: 3}

View File

@@ -38,8 +38,8 @@ public class QuizController : MonoBehaviour {
private List<int> selectedAnswers;
List<Question> questions = new List<Question>() {
new Question("Q1", new int[] {1, 3}),
new Question("Q2", new int[] {2}),
new Question("1. Neki od ovih prozora imaju 2-3 puta manje toplotnih gubitaka za razliku od drugih, koji su to?", new int[] {1, 3}),
new Question("2. Na jedan od načina možete uštedjeti i do 10 litara vode po osobi dnevno, uz koji predmet?", new int[] {2}),
};
// Use this for initialization
@@ -93,12 +93,12 @@ public class QuizController : MonoBehaviour {
private void UpdateScore()
{
scoreText.text = "Score: " + scoreValue.ToString();
scoreText.text = scoreValue.ToString();
}
private void UpdateCounter()
{
counterText.text = "Counter: " + counterValue.ToString("f0");
counterText.text = counterValue.ToString("f0");
}
private void UpdateScene()