Input Enabling after starting timer, Spawning Players in Center.

dev-ali
Ali Sharoz 2 days ago
parent 574f5bdadb
commit 5a94688fe7

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

@ -1,4 +1,4 @@
using UnityEngine;
using UnityEngine;
#if false || EPO_DOTWEEN // MODULE_MARKER

@ -1,4 +1,4 @@
// Author: Daniele Giardini - http://www.demigiant.com
// Author: Daniele Giardini - http://www.demigiant.com
// Created: 2018/07/13
#if true // MODULE_MARKER

@ -22,7 +22,7 @@ MonoBehaviour:
maxSmoothUnscaledTime: 0.15
rewindCallbackMode: 0
showUnityEditorReport: 0
logBehaviour: 0
logBehaviour: 2
drawGizmos: 1
defaultRecyclable: 0
defaultAutoPlay: 3
@ -49,6 +49,6 @@ MonoBehaviour:
deAudioEnabled: 0
deUnityExtendedEnabled: 0
epoOutlineEnabled: 0
createASMDEF: 0
createASMDEF: 1
showPlayingTweens: 0
showPausedTweens: 0

@ -8641,7 +8641,7 @@ PrefabInstance:
m_Modifications:
- target: {fileID: 205271637847874222, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.x
value: 0.59
value: 0
objectReference: {fileID: 0}
- target: {fileID: 205271637847874222, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.y
@ -8649,7 +8649,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 205271637847874222, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.z
value: -2.35
value: -1
objectReference: {fileID: 0}
- target: {fileID: 205271637847874222, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 205271637847874222, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 205271637847874222, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 297185343939699586, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_Name
@ -8657,7 +8669,7 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 374135395555381814, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.x
value: 0.87
value: 1
objectReference: {fileID: 0}
- target: {fileID: 374135395555381814, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.y
@ -8665,11 +8677,23 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 374135395555381814, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.z
value: 6.65
value: 0
objectReference: {fileID: 0}
- target: {fileID: 374135395555381814, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 374135395555381814, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 374135395555381814, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 1041503493158943442, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.x
value: 4
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1041503493158943442, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.y
@ -8677,7 +8701,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1041503493158943442, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.z
value: 4.5
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1041503493158943442, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 1041503493158943442, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 1041503493158943442, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 3608714310874968837, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: GlobalObjectIdHash
@ -8765,7 +8801,7 @@ PrefabInstance:
objectReference: {fileID: 1690610727}
- target: {fileID: 6314369147267609336, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.x
value: -3.11
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6314369147267609336, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.y
@ -8773,11 +8809,23 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6314369147267609336, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.z
value: -0.6
value: -1
objectReference: {fileID: 0}
- target: {fileID: 6314369147267609336, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6314369147267609336, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6314369147267609336, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 6319832178442273571, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.x
value: -2.52
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6319832178442273571, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.y
@ -8785,11 +8833,23 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 6319832178442273571, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.z
value: 4.39
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6319832178442273571, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6319832178442273571, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 6319832178442273571, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: 7456333582246237812, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.x
value: 4.31
value: -1
objectReference: {fileID: 0}
- target: {fileID: 7456333582246237812, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.y
@ -8797,7 +8857,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 7456333582246237812, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalPosition.z
value: -0.68
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7456333582246237812, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7456333582246237812, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalRotation.y
value: 1
objectReference: {fileID: 0}
- target: {fileID: 7456333582246237812, guid: 8b9c63e7d70c5ff48a03aad51e17103c, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects:
@ -9305,11 +9377,11 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.y
value: 0.28987613
value: 0.28987604
objectReference: {fileID: 0}
- target: {fileID: 1676734515771252668, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.z
value: -0.18152039
value: -0.1815203
objectReference: {fileID: 0}
- target: {fileID: 1676734516302391364, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_UpdateMethod
@ -9337,19 +9409,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1676734516695783279, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.w
value: 0.79006946
value: 0.7900695
objectReference: {fileID: 0}
- target: {fileID: 1676734516695783279, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.x
value: 0.50873625
value: 0.5087362
objectReference: {fileID: 0}
- target: {fileID: 1676734516695783279, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.y
value: 0.2875618
value: 0.2875617
objectReference: {fileID: 0}
- target: {fileID: 1676734516695783279, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalRotation.z
value: -0.18516485
value: -0.18516475
objectReference: {fileID: 0}
- target: {fileID: 1676734516724634599, guid: 0193228de87741d40a42e561901c9083, type: 3}
propertyPath: m_LocalPosition.y
@ -9602,19 +9674,19 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3}
propertyPath: m_LocalRotation.w
value: 0.79006934
value: 0.7900696
objectReference: {fileID: 0}
- target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3}
propertyPath: m_LocalRotation.x
value: 0.5087363
value: 0.50873613
objectReference: {fileID: 0}
- target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3}
propertyPath: m_LocalRotation.y
value: 0.28756183
value: 0.2875617
objectReference: {fileID: 0}
- target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3}
propertyPath: m_LocalRotation.z
value: -0.18516491
value: -0.18516473
objectReference: {fileID: 0}
- target: {fileID: 203267159508449512, guid: 36b3ee75677a1544191c0ddaaadd8140, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
@ -10524,7 +10596,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 0, g: 0, b: 0, a: 1}
m_Color: {r: 0, g: 0, b: 0, a: 0.78431374}
m_RaycastTarget: 0
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
@ -10698,7 +10770,7 @@ Transform:
m_GameObject: {fileID: 1640132953}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 1, z: 0, w: 0}
m_LocalPosition: {x: 0.65, y: 0, z: 1.64}
m_LocalPosition: {x: -1, y: 0, z: 1}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []

@ -5,6 +5,8 @@ using TMPro;
using DG.Tweening;
using Unity.Netcode;
using Unity.Multiplayer.Samples.Utilities;
using UnityEngine.Events;
using System;
public class StartingTimer : NetworkBehaviour
{
@ -14,6 +16,7 @@ public class StartingTimer : NetworkBehaviour
private NetworkVariable<int> timerValue = new NetworkVariable<int>(0, NetworkVariableReadPermission.Everyone, NetworkVariableWritePermission.Server);
private bool coroutineStartedBool = false;
public static event Action StartingTimerEnded;
private void Start()
{
@ -30,7 +33,6 @@ public class StartingTimer : NetworkBehaviour
StartCoroutine(ServerTimerCoroutine());
}
}
// Update the UI on all clients
UpdateTimerUI();
}
@ -38,16 +40,14 @@ public class StartingTimer : NetworkBehaviour
private IEnumerator ServerTimerCoroutine()
{
const int countdownStart = 3;
for (int i = countdownStart; i > 0; i--)
{
timerValue.Value = i;
yield return new WaitForSeconds(1);
}
timerValue.Value = -1; // Indicate "GO"
yield return new WaitForSeconds(0.5f);
StartingTimerEnded?.Invoke();
// Notify clients to disable the black screen
BlackScreenAlphaDisablerClientRpc();
}
@ -67,9 +67,11 @@ public class StartingTimer : NetworkBehaviour
[ClientRpc]
private void BlackScreenAlphaDisablerClientRpc()
{
BlackScreen.DOFade(0, 0.25f).OnComplete(() =>
{
BlackScreen.gameObject.SetActive(false);
gameObject.SetActive(false);
});
//BlackScreen.DOFade(0, 0.25f).OnComplete(() =>
//{
// gameObject.SetActive(false);
//});
}
}

@ -1,4 +1,5 @@
using System;
using System.Collections;
using Unity.BossRoom.Gameplay.Actions;
using Unity.BossRoom.Gameplay.Configuration;
using Unity.BossRoom.Gameplay.GameplayObjects;
@ -123,12 +124,32 @@ namespace Unity.BossRoom.Gameplay.UserInput
public UIMessageFeed m_UIMessageFeed;
ServerCharacter m_TargetServerCharacter;
private bool IsSwapModeActive = false;
bool m_InputAllower = false;
void Awake()
{
m_MainCamera = Camera.main;
}
private void OnEnable()
{
StartingTimer.StartingTimerEnded += inputAllowerActivator;
}
private void OnDisable()
{
StartingTimer.StartingTimerEnded -= inputAllowerActivator;
}
void Update()
{
if (m_InputAllower)
{
HandleSwapInput();
HandleAbilityInput();
HandleMovementInput();
}
}
void inputAllowerActivator()
{
m_InputAllower = true;
}
public override void OnNetworkSpawn()
{
if (!IsClient || !IsOwner)
@ -479,12 +500,6 @@ namespace Unity.BossRoom.Gameplay.UserInput
}
}
void Update()
{
HandleSwapInput();
HandleAbilityInput();
HandleMovementInput();
}
private void HandleSwapInput()
{

Loading…
Cancel
Save