Typing Game completed.

This commit is contained in:
Project Unity 2025-11-19 05:58:58 +08:00
parent c8958fcc53
commit d0878733de
11 changed files with 5128 additions and 31 deletions

2
.editorconfig Normal file
View File

@ -0,0 +1,2 @@
[*.{cs,csx,vb,vbx,txt,html,htm,css,js,json,yml,yaml,xml,config,ini,sh,ps1,psm1,psd1,ps1xml,psrc1xml,csproj,sln,gitignore,gitattributes,editorconfig,md,markdown,txt,asciidoc,adoc,asc,asciidoc,txt,ipynb,py}]
charset = utf-8-bom

View File

@ -1036,12 +1036,14 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 7553dda633295904ab8b192ea6bbee5d, type: 3} m_Script: {fileID: 11500000, guid: 7553dda633295904ab8b192ea6bbee5d, type: 3}
m_Name: m_Name:
m_EditorClassIdentifier: Assembly-CSharp::ClientGameTypingSceneController m_EditorClassIdentifier: Assembly-CSharp::ClientGameTypingSceneController
introPanel: {fileID: 0} introPanel: {fileID: 1137455342}
playPanel: {fileID: 0} playPanel: {fileID: 765506755}
stopPanel: {fileID: 0} stopPanel: {fileID: 256293683}
finishPanel: {fileID: 0} finishPanel: {fileID: 24681882}
playCountdownText: {fileID: 0} playCountdownText: {fileID: 1251435278}
playInputField: {fileID: 0} playInputField: {fileID: 525460692}
finishGoToNextButton: {fileID: 1871727157}
finishBackToMenuButton: {fileID: 1354061672}
--- !u!1 &991658852 --- !u!1 &991658852
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0

View File

@ -267,10 +267,18 @@ PrefabInstance:
propertyPath: m_AnchoredPosition.y propertyPath: m_AnchoredPosition.y
value: 0 value: 0
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1517595439450411210, guid: 417fcf62987878e44bd784ea552f37bd, type: 3}
propertyPath: m_PresetInfoIsWorld
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1871740932565074069, guid: 417fcf62987878e44bd784ea552f37bd, type: 3} - target: {fileID: 1871740932565074069, guid: 417fcf62987878e44bd784ea552f37bd, type: 3}
propertyPath: m_Text propertyPath: m_Text
value: "\u6709\u4EFB\u4F55\u5EFA\u8B70\u55CE?\u597D\u58DE\u90FD\u6B61\u8FCE!" value: "\u6709\u4EFB\u4F55\u5EFA\u8B70\u55CE?\u597D\u58DE\u90FD\u6B61\u8FCE!"
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 1963578699943294826, guid: 417fcf62987878e44bd784ea552f37bd, type: 3}
propertyPath: m_GlobalFontAsset
value:
objectReference: {fileID: 11400000, guid: 2cfe2255ddbc8dc44b75239d2f654cd0, type: 2}
- target: {fileID: 2429518323809000106, guid: 417fcf62987878e44bd784ea552f37bd, type: 3} - target: {fileID: 2429518323809000106, guid: 417fcf62987878e44bd784ea552f37bd, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0
@ -353,7 +361,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4662508893445052427, guid: 417fcf62987878e44bd784ea552f37bd, type: 3} - target: {fileID: 4662508893445052427, guid: 417fcf62987878e44bd784ea552f37bd, type: 3}
propertyPath: m_AnchoredPosition.x propertyPath: m_AnchoredPosition.x
value: 1927 value: 212.68677
objectReference: {fileID: 0}
- target: {fileID: 4662508893445052427, guid: 417fcf62987878e44bd784ea552f37bd, type: 3}
propertyPath: m_AnchoredPosition.y
value: -158.15627
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 4739635702114211264, guid: 417fcf62987878e44bd784ea552f37bd, type: 3} - target: {fileID: 4739635702114211264, guid: 417fcf62987878e44bd784ea552f37bd, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
@ -375,6 +387,10 @@ PrefabInstance:
propertyPath: m_Name propertyPath: m_Name
value: Canvas (1) value: Canvas (1)
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 5050729680893352325, guid: 417fcf62987878e44bd784ea552f37bd, type: 3}
propertyPath: m_IsActive
value: 1
objectReference: {fileID: 0}
- target: {fileID: 5708950395204637937, guid: 417fcf62987878e44bd784ea552f37bd, type: 3} - target: {fileID: 5708950395204637937, guid: 417fcf62987878e44bd784ea552f37bd, type: 3}
propertyPath: m_AnchorMax.y propertyPath: m_AnchorMax.y
value: 0 value: 0

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,8 @@
using System.Collections; using System.Collections;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class ClientGameTypingSceneController : MonoBehaviour public class ClientGameTypingSceneController : MonoBehaviour
{ {
@ -14,6 +16,9 @@ public class ClientGameTypingSceneController : MonoBehaviour
public TMP_Text playCountdownText; public TMP_Text playCountdownText;
public TMP_InputField playInputField; public TMP_InputField playInputField;
public Button finishGoToNextButton;
public Button finishBackToMenuButton;
private int playCountdownSecVal = 60; private int playCountdownSecVal = 60;
@ -94,10 +99,37 @@ public class ClientGameTypingSceneController : MonoBehaviour
// Start is called once before the first execution of Update after the MonoBehaviour is created // Start is called once before the first execution of Update after the MonoBehaviour is created
void Start() void Start()
{
if (finishGoToNextButton)
{
finishGoToNextButton.onClick.AddListener(finishGoToNextButton_onClicked);
}
if (finishBackToMenuButton)
{
finishBackToMenuButton.onClick.AddListener(finishBackToMenuButton_onClicked);
}
init();
}
private void finishGoToNextButton_onClicked()
{ {
if (ClientMessageHandler.Instance)
{
ClientMessageHandler.Instance.SendMessageToServer("getWords", "");
}
StartCoroutine(LoadNextScene("ClientGameBackToRealScene"));
} }
private void finishBackToMenuButton_onClicked()
{
StartCoroutine(LoadNextScene("ClientGameScene"));
}
IEnumerator LoadNextScene(string sceneName)
{
yield return new WaitForSeconds(0f);
SceneManager.LoadScene(sceneName);
}
// Update is called once per frame // Update is called once per frame
void Update() void Update()
{ {

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections; using System.Collections;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
@ -13,6 +13,11 @@ public class ServerGameFinalSurveyPanel : MonoBehaviour
public static string val3; public static string val3;
public static string text1; public static string text1;
public StarRating val1StarRating;
public StarRating val2StarRating;
public StarRating val3StarRating;
public TMP_Text text1Text;
public Button okButton; public Button okButton;
private void Awake() private void Awake()
@ -27,6 +32,11 @@ public class ServerGameFinalSurveyPanel : MonoBehaviour
{ {
okButton.onClick.AddListener(okButton_onClicked); okButton.onClick.AddListener(okButton_onClicked);
} }
if (text1Text)
{
text1Text.text = text1;
}
} }
private void okButton_onClicked() private void okButton_onClicked()

View File

@ -1,4 +1,4 @@
using System; using System;
using System.Collections; using System.Collections;
using TMPro; using TMPro;
using UnityEngine; using UnityEngine;
@ -26,7 +26,7 @@ public class ServerGameTypingPanel : MonoBehaviour
private CustomerReportSystem customReportScript; private CustomerReportSystem customReportScript;
private int gameTimeCountdownSecVal = 10; private int gameTimeCountdownSecVal = 60;
private void Awake() private void Awake()
{ {
@ -41,7 +41,7 @@ public class ServerGameTypingPanel : MonoBehaviour
introPanel.SetActive(step == 1); introPanel.SetActive(step == 1);
if (step == 1) if (step == 1)
{ {
gameTimeCountdownSecVal = 10; gameTimeCountdownSecVal = 60;
if (introVideoPlayer) if (introVideoPlayer)
{ {
introVideoPlayer.Play(); introVideoPlayer.Play();
@ -163,8 +163,13 @@ public class ServerGameTypingPanel : MonoBehaviour
SetupPlayVideoPlayer(); SetupPlayVideoPlayer();
customReportScript.OnCustomerReportConfirmed = OnCustomerReportConfirmed; customReportScript.OnCustomerReportConfirmed = OnCustomerReportConfirmed;
}
init();
}
public void init()
{
processStep(1);
}
private void OnCustomerReportConfirmed(int[] values) private void OnCustomerReportConfirmed(int[] values)
{ {
if (values.Length < 3) { return; } if (values.Length < 3) { return; }

View File

@ -1,3 +1,4 @@
using Unity.VisualScripting;
using UnityEngine; using UnityEngine;
using UnityEngine.UI; using UnityEngine.UI;
@ -205,14 +206,25 @@ public class ServerWorkSceneController : MonoBehaviour
if (gameTalkingPanel) if (gameTalkingPanel)
{ {
gameTalkingPanel.SetActive(step == 14 ? true : false); gameTalkingPanel.SetActive(step == 14 ? true : false);
if (ServerGameTalkingPanel.Instance) if (step == 14)
{ {
ServerGameTalkingPanel.Instance.init(); if (ServerGameTalkingPanel.Instance)
{
ServerGameTalkingPanel.Instance.init();
}
} }
} }
if (gameTypingPanel) if (gameTypingPanel)
{ {
gameTypingPanel.SetActive(step == 15 ? true : false); gameTypingPanel.SetActive(step == 15 ? true : false);
if (step == 15)
{
if (ServerGameTypingPanel.Instance)
{
ServerGameTypingPanel.Instance.init();
}
}
} }
if (gameSticksPanel) if (gameSticksPanel)
{ {

File diff suppressed because one or more lines are too long

View File

@ -432,8 +432,8 @@ RectTransform:
- {fileID: 3695168142622149925} - {fileID: 3695168142622149925}
- {fileID: 5433734489123071011} - {fileID: 5433734489123071011}
- {fileID: 5113161888204328251} - {fileID: 5113161888204328251}
- {fileID: 2803018867856744016}
- {fileID: 4662508893445052427} - {fileID: 4662508893445052427}
- {fileID: 2803018867856744016}
m_Father: {fileID: 7135157165216916393} m_Father: {fileID: 7135157165216916393}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 0} m_AnchorMin: {x: 0, y: 0}
@ -1226,10 +1226,10 @@ RectTransform:
m_Children: [] m_Children: []
m_Father: {fileID: 566918525401893825} m_Father: {fileID: 566918525401893825}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0, y: 1} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0, y: 1} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 768, y: -1162} m_AnchoredPosition: {x: 217.34998, y: -170.2522}
m_SizeDelta: {x: 590.296, y: 114.217} m_SizeDelta: {x: 590.29614, y: 42.649414}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &8653464678444402698 --- !u!222 &8653464678444402698
CanvasRenderer: CanvasRenderer:
@ -1759,7 +1759,7 @@ MonoBehaviour:
m_FallbackScreenDPI: 96 m_FallbackScreenDPI: 96
m_DefaultSpriteDPI: 96 m_DefaultSpriteDPI: 96
m_DynamicPixelsPerUnit: 1 m_DynamicPixelsPerUnit: 1
m_PresetInfoIsWorld: 0 m_PresetInfoIsWorld: 1
--- !u!114 &7637437997336638635 --- !u!114 &7637437997336638635
MonoBehaviour: MonoBehaviour:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
@ -2153,8 +2153,8 @@ RectTransform:
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_AnchorMin: {x: 0.5, y: 0.5} m_AnchorMin: {x: 0.5, y: 0.5}
m_AnchorMax: {x: 0.5, y: 0.5} m_AnchorMax: {x: 0.5, y: 0.5}
m_AnchoredPosition: {x: 182, y: -7} m_AnchoredPosition: {x: 182, y: 9.063923}
m_SizeDelta: {x: 413.901, y: 82} m_SizeDelta: {x: 413.901, y: 49.8721}
m_Pivot: {x: 0.5, y: 0.5} m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &4687363353908593427 --- !u!222 &4687363353908593427
CanvasRenderer: CanvasRenderer:
@ -2593,8 +2593,8 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_text: "\u200B" m_text: "\u200B"
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: cc458a6f448640643aef2178596e99e4, type: 2} m_fontAsset: {fileID: 11400000, guid: 2cfe2255ddbc8dc44b75239d2f654cd0, type: 2}
m_sharedMaterial: {fileID: -1020867766468416942, guid: cc458a6f448640643aef2178596e99e4, type: 2} m_sharedMaterial: {fileID: -2170148179293471370, guid: 2cfe2255ddbc8dc44b75239d2f654cd0, type: 2}
m_fontSharedMaterials: [] m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0} m_fontMaterial: {fileID: 0}
m_fontMaterials: [] m_fontMaterials: []
@ -3062,8 +3062,8 @@ MonoBehaviour:
m_Calls: [] m_Calls: []
m_text: "\u81EA\u884C\u8F38\u5165...." m_text: "\u81EA\u884C\u8F38\u5165...."
m_isRightToLeft: 0 m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: cc458a6f448640643aef2178596e99e4, type: 2} m_fontAsset: {fileID: 11400000, guid: 2cfe2255ddbc8dc44b75239d2f654cd0, type: 2}
m_sharedMaterial: {fileID: -1020867766468416942, guid: cc458a6f448640643aef2178596e99e4, type: 2} m_sharedMaterial: {fileID: -2170148179293471370, guid: 2cfe2255ddbc8dc44b75239d2f654cd0, type: 2}
m_fontSharedMaterials: [] m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0} m_fontMaterial: {fileID: 0}
m_fontMaterials: [] m_fontMaterials: []
@ -3319,7 +3319,7 @@ MonoBehaviour:
m_CaretWidth: 1 m_CaretWidth: 1
m_ReadOnly: 0 m_ReadOnly: 0
m_RichText: 1 m_RichText: 1
m_GlobalFontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2} m_GlobalFontAsset: {fileID: 11400000, guid: 2cfe2255ddbc8dc44b75239d2f654cd0, type: 2}
m_OnFocusSelectAll: 1 m_OnFocusSelectAll: 1
m_ResetOnDeActivation: 1 m_ResetOnDeActivation: 1
m_KeepTextSelectionVisible: 0 m_KeepTextSelectionVisible: 0