update score

master
tiendat3699 2024-04-16 17:27:54 +07:00
parent 6234e34067
commit bc1bd5d6e8
4 changed files with 14 additions and 9 deletions

View File

@ -99,7 +99,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 58cac044c3a741ca9d0953f7c968d3f1, type: 3}
m_Name:
m_EditorClassIdentifier:
_reduceScore: 5
_reduceScore: 3
_rb: {fileID: 9129339961973675669}
--- !u!50 &9129339961973675669
Rigidbody2D:

View File

@ -190,8 +190,8 @@ MonoBehaviour:
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
@ -550,8 +550,8 @@ MonoBehaviour:
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
@ -1107,8 +1107,8 @@ MonoBehaviour:
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 4278190080
m_fontColor: {r: 0, g: 0, b: 0, a: 1}
rgba: 4294967295
m_fontColor: {r: 1, g: 1, b: 1, a: 1}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:

View File

@ -11,11 +11,13 @@ namespace GadGame.MiniGame
[SerializeField] private Rigidbody2D _rb;
private bool _inUsed;
private Tweener _tweener;
public void Init(float gravityScale = 1)
{
_rb.gravityScale = gravityScale;
transform.DORotate(new Vector3(0, 0, 1),0.1f).SetLoops(-1, LoopType.Incremental);
_tweener = transform.DORotate(new Vector3(0, 0, gravityScale * 50),0.1f).SetLoops(-1, LoopType.Incremental);
}
private void LateUpdate()
@ -40,6 +42,9 @@ namespace GadGame.MiniGame
public void OnRelease()
{
_inUsed = false;
_tweener.Restart();
_tweener.Complete();
_tweener.Kill();
}
}
}

View File

@ -42,7 +42,7 @@ namespace GadGame.State.MainFlowState
}
if (!UdpSocket.Instance.DataReceived.Ready) _readyTimer = 0;
_readyTimer += Time.deltaTime;
if (_readyTimer >= 5)
if (_readyTimer >= 3)
{
Runner.SetState<PlayGameState>();
}