-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ya se pueden abrir preguntas y respuestas
- Loading branch information
1 parent
e85b0a5
commit d162629
Showing
22 changed files
with
3,253 additions
and
476 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using System.Collections; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class QuestionCollection { | ||
|
||
public List<Question> questions; | ||
|
||
public QuestionCollection(Question[] questions) { | ||
this.questions = new List<Question>(questions); | ||
} | ||
|
||
public Question RandomWithValue(int value) { | ||
Question[] results = questions.FindAll(x => x.value == value).ToArray(); | ||
return results[Random.Range(0, results.Length - 1)]; | ||
} | ||
|
||
public Question RandomWithValueAndCategory(int value, Question.Category category) { | ||
Question[] results = questions.FindAll(x => x.value == value && x.category == category).ToArray(); | ||
return results[Random.Range(0, results.Length - 1)]; | ||
} | ||
|
||
} |
File renamed without changes.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,171 @@ | ||
%YAML 1.1 | ||
%TAG !u! tag:unity3d.com,2011: | ||
--- !u!1001 &100100000 | ||
Prefab: | ||
m_ObjectHideFlags: 1 | ||
serializedVersion: 2 | ||
m_Modification: | ||
m_TransformParent: {fileID: 0} | ||
m_Modifications: [] | ||
m_RemovedComponents: [] | ||
m_ParentPrefab: {fileID: 0} | ||
m_RootGameObject: {fileID: 1218439856269182} | ||
m_IsPrefabParent: 1 | ||
--- !u!1 &1218439856269182 | ||
GameObject: | ||
m_ObjectHideFlags: 0 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 100100000} | ||
serializedVersion: 5 | ||
m_Component: | ||
- component: {fileID: 224427850518321010} | ||
- component: {fileID: 222076114908623550} | ||
- component: {fileID: 114903234933871722} | ||
m_Layer: 5 | ||
m_Name: question_panel | ||
m_TagString: Untagged | ||
m_Icon: {fileID: 0} | ||
m_NavMeshLayer: 0 | ||
m_StaticEditorFlags: 0 | ||
m_IsActive: 1 | ||
--- !u!1 &1603244778178036 | ||
GameObject: | ||
m_ObjectHideFlags: 0 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 100100000} | ||
serializedVersion: 5 | ||
m_Component: | ||
- component: {fileID: 224942574397031370} | ||
- component: {fileID: 222863958130907512} | ||
- component: {fileID: 114606300582917454} | ||
- component: {fileID: 114579908619626012} | ||
m_Layer: 5 | ||
m_Name: question_text | ||
m_TagString: Untagged | ||
m_Icon: {fileID: 0} | ||
m_NavMeshLayer: 0 | ||
m_StaticEditorFlags: 0 | ||
m_IsActive: 1 | ||
--- !u!114 &114579908619626012 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 1 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 100100000} | ||
m_GameObject: {fileID: 1603244778178036} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: 1573420865, guid: f70555f144d8491a825f0804e09c671c, type: 3} | ||
m_Name: | ||
m_EditorClassIdentifier: | ||
m_EffectColor: {r: 0, g: 0, b: 0, a: 1} | ||
m_EffectDistance: {x: 8.35, y: -6.78} | ||
m_UseGraphicAlpha: 1 | ||
--- !u!114 &114606300582917454 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 1 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 100100000} | ||
m_GameObject: {fileID: 1603244778178036} | ||
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: 1, g: 1, b: 1, 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: a30f933bed2f6504bae572c0ef6aaeb7, type: 3} | ||
m_FontSize: 14 | ||
m_FontStyle: 0 | ||
m_BestFit: 1 | ||
m_MinSize: 10 | ||
m_MaxSize: 94 | ||
m_Alignment: 4 | ||
m_AlignByGeometry: 0 | ||
m_RichText: 1 | ||
m_HorizontalOverflow: 0 | ||
m_VerticalOverflow: 0 | ||
m_LineSpacing: 1 | ||
m_Text: "\xBFEl texto de la pregunta va aqu\xED?" | ||
--- !u!114 &114903234933871722 | ||
MonoBehaviour: | ||
m_ObjectHideFlags: 1 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 100100000} | ||
m_GameObject: {fileID: 1218439856269182} | ||
m_Enabled: 1 | ||
m_EditorHideFlags: 0 | ||
m_Script: {fileID: -765806418, guid: f70555f144d8491a825f0804e09c671c, type: 3} | ||
m_Name: | ||
m_EditorClassIdentifier: | ||
m_Material: {fileID: 0} | ||
m_Color: {r: 0.10942906, g: 0.15763047, b: 0.64705884, 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_Sprite: {fileID: 21300000, guid: 8e31a0b6b65fafd4d82e63a4d08ef8d1, type: 3} | ||
m_Type: 0 | ||
m_PreserveAspect: 0 | ||
m_FillCenter: 1 | ||
m_FillMethod: 4 | ||
m_FillAmount: 1 | ||
m_FillClockwise: 1 | ||
m_FillOrigin: 0 | ||
--- !u!222 &222076114908623550 | ||
CanvasRenderer: | ||
m_ObjectHideFlags: 1 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 100100000} | ||
m_GameObject: {fileID: 1218439856269182} | ||
--- !u!222 &222863958130907512 | ||
CanvasRenderer: | ||
m_ObjectHideFlags: 1 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 100100000} | ||
m_GameObject: {fileID: 1603244778178036} | ||
--- !u!224 &224427850518321010 | ||
RectTransform: | ||
m_ObjectHideFlags: 1 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 100100000} | ||
m_GameObject: {fileID: 1218439856269182} | ||
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: 224942574397031370} | ||
m_Father: {fileID: 0} | ||
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!224 &224942574397031370 | ||
RectTransform: | ||
m_ObjectHideFlags: 1 | ||
m_PrefabParentObject: {fileID: 0} | ||
m_PrefabInternal: {fileID: 100100000} | ||
m_GameObject: {fileID: 1603244778178036} | ||
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: 224427850518321010} | ||
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: -453.2, y: -46} | ||
m_Pivot: {x: 0.5, y: 0.5} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.