Commit ed599a24 by alsunj

Added SpawnerManager, PlayerHealth, DamageCollision, RespawnManager

parent 8633100d
Showing with 931 additions and 815 deletions
......@@ -2,20 +2,24 @@
%TAG !u! tag:unity3d.com,2011:
--- !u!21 &2180264
Material:
serializedVersion: 6
serializedVersion: 8
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: LiberationSans SDF Material
m_Shader: {fileID: 4800000, guid: fe393ace9b354375a9cb14cdbbc28be4, type: 3}
m_ShaderKeywords:
m_Parent: {fileID: 0}
m_ModifiedSerializedProperties: 0
m_ValidKeywords: []
m_InvalidKeywords: []
m_LightmapFlags: 1
m_EnableInstancingVariants: 0
m_DoubleSidedGI: 0
m_CustomRenderQueue: -1
stringTagMap: {}
disabledShaderPasses: []
m_LockedProperties:
m_SavedProperties:
serializedVersion: 3
m_TexEnvs:
......@@ -67,6 +71,7 @@ Material:
m_Texture: {fileID: 0}
m_Scale: {x: 1, y: 1}
m_Offset: {x: 0, y: 0}
m_Ints: []
m_Floats:
- _Ambient: 0.5
- _Bevel: 0.5
......@@ -148,6 +153,8 @@ Material:
- _ReflectOutlineColor: {r: 0, g: 0, b: 0, a: 1}
- _SpecularColor: {r: 1, g: 1, b: 1, a: 1}
- _UnderlayColor: {r: 0, g: 0, b: 0, a: 0.5}
m_BuildTextureStacks: []
m_AllowLocking: 1
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -161,17 +168,13 @@ MonoBehaviour:
m_Name: LiberationSans SDF - Fallback
m_EditorClassIdentifier:
m_Version: 1.1.0
m_Material: {fileID: 2180264}
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_AtlasPopulationMode: 1
InternalDynamicOS: 0
m_FaceInfo:
m_FaceIndex: 0
m_FamilyName: Liberation Sans
m_StyleName: Regular
m_PointSize: 86
m_Scale: 1
m_UnitsPerEM: 2048
m_LineHeight: 98.8916
m_AscentLine: 77.853516
m_CapLine: 59
......@@ -187,76 +190,57 @@ MonoBehaviour:
m_StrikethroughOffset: 18
m_StrikethroughThickness: 6.298828
m_TabWidth: 24
m_Material: {fileID: 2180264}
m_SourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
m_CreationSettings:
sourceFontFileName:
sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
faceIndex: 0
pointSizeSamplingMode: 0
pointSize: 86
padding: 9
paddingMode: 0
packingMode: 4
atlasWidth: 512
atlasHeight: 512
characterSetSelectionMode: 1
characterSequence: 32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633
referencedFontAssetGUID: 8f586378b4e144a9851e7b34d9b748ee
referencedTextAssetGUID:
fontStyle: 0
fontStyleModifier: 0
renderMode: 4169
includeFontFeatures: 1
m_SourceFontFile: {fileID: 12800000, guid: e3265ab4bf004d28a9537516768c1c75, type: 3}
m_SourceFontFilePath:
m_AtlasPopulationMode: 1
InternalDynamicOS: 0
m_GlyphTable: []
m_CharacterTable: []
m_AtlasTextures:
- {fileID: 28268798066460806}
m_AtlasTextureIndex: 0
m_IsMultiAtlasTexturesEnabled: 1
m_GetFontFeatures: 1
m_ClearDynamicDataOnBuild: 1
m_AtlasWidth: 512
m_AtlasHeight: 512
m_AtlasPadding: 9
m_AtlasRenderMode: 4169
m_UsedGlyphRects: []
m_FreeGlyphRects:
- m_X: 0
m_Y: 0
m_Width: 511
m_Height: 511
m_fontInfo:
Name: Liberation Sans
PointSize: 86
Scale: 1
CharacterCount: 250
LineHeight: 98.90625
Baseline: 0
Ascender: 77.84375
CapHeight: 59.1875
Descender: -18.21875
CenterLine: 0
SuperscriptOffset: 77.84375
SubscriptOffset: -12.261719
SubSize: 0.5
Underline: -12.261719
UnderlineThickness: 6.298828
strikethrough: 23.675
strikethroughThickness: 0
TabWidth: 239.0625
Padding: 9
AtlasWidth: 1024
AtlasHeight: 1024
atlas: {fileID: 0}
m_AtlasWidth: 512
m_AtlasHeight: 512
m_AtlasPadding: 9
m_AtlasRenderMode: 4169
m_glyphInfoList: []
m_KerningTable:
kerningPairs: []
m_FontFeatureTable:
m_MultipleSubstitutionRecords: []
m_LigatureSubstitutionRecords: []
m_GlyphPairAdjustmentRecords: []
m_MarkToBaseAdjustmentRecords: []
m_MarkToMarkAdjustmentRecords: []
fallbackFontAssets: []
m_ShouldReimportFontFeatures: 0
m_FallbackFontAssetTable: []
m_CreationSettings:
sourceFontFileName:
sourceFontFileGUID: e3265ab4bf004d28a9537516768c1c75
faceIndex: 0
pointSizeSamplingMode: 0
pointSize: 86
padding: 9
paddingMode: 0
packingMode: 4
atlasWidth: 512
atlasHeight: 512
characterSetSelectionMode: 1
characterSequence: 32 - 126, 160 - 255, 8192 - 8303, 8364, 8482, 9633
referencedFontAssetGUID: 8f586378b4e144a9851e7b34d9b748ee
referencedTextAssetGUID:
fontStyle: 0
fontStyleModifier: 0
renderMode: 4169
includeFontFeatures: 1
m_FontWeightTable:
- regularTypeface: {fileID: 0}
italicTypeface: {fileID: 0}
......@@ -305,6 +289,33 @@ MonoBehaviour:
boldSpacing: 7
italicStyle: 35
tabSize: 10
m_fontInfo:
Name: Liberation Sans
PointSize: 86
Scale: 1
CharacterCount: 250
LineHeight: 98.90625
Baseline: 0
Ascender: 77.84375
CapHeight: 59.1875
Descender: -18.21875
CenterLine: 0
SuperscriptOffset: 77.84375
SubscriptOffset: -12.261719
SubSize: 0.5
Underline: -12.261719
UnderlineThickness: 6.298828
strikethrough: 23.675
strikethroughThickness: 0
TabWidth: 239.0625
Padding: 9
AtlasWidth: 1024
AtlasHeight: 1024
m_glyphInfoList: []
m_KerningTable:
kerningPairs: []
fallbackFontAssets: []
atlas: {fileID: 0}
--- !u!28 &28268798066460806
Texture2D:
m_ObjectHideFlags: 0
......@@ -315,17 +326,21 @@ Texture2D:
m_ImageContentsHash:
serializedVersion: 2
Hash: 00000000000000000000000000000000
m_ForcedFallbackFormat: 4
m_DownscaleFallback: 0
serializedVersion: 2
m_Width: 0
m_Height: 0
m_CompleteImageSize: 0
m_IsAlphaChannelOptional: 0
serializedVersion: 3
m_Width: 1
m_Height: 1
m_CompleteImageSize: 1
m_MipsStripped: 0
m_TextureFormat: 1
m_MipCount: 1
m_IsReadable: 1
m_IsPreProcessed: 0
m_IgnoreMipmapLimit: 0
m_MipmapLimitGroupName:
m_StreamingMipmaps: 0
m_StreamingMipmapsPriority: 0
m_VTOnly: 0
m_AlphaIsTransparency: 0
m_ImageCount: 1
m_TextureDimension: 2
......@@ -339,9 +354,11 @@ Texture2D:
m_WrapW: 0
m_LightmapFormat: 0
m_ColorSpace: 0
image data: 0
_typelessdata:
m_PlatformBlob:
image data: 1
_typelessdata: 00
m_StreamData:
serializedVersion: 2
offset: 0
size: 0
path:
......@@ -48,7 +48,7 @@ public class AnimatedEnemy : Enemy
// _enemyManager.enemyEvents.EnemyReload();
// }
protected void AimAtTarget()
protected virtual void AimAtTarget()
{
_enemyManager.enemyEvents.EnemyAim();
}
......
using Unity.Netcode;
using UnityEngine;
public class DamageCollision : NetworkBehaviour
{
[SerializeField] private DamageCollisionSettings _damageCollisionSettings;
private int _targetLayer;
private int _damage;
public override void OnNetworkSpawn()
{
_targetLayer = GetLayerFromLayerMask(_damageCollisionSettings.targetLayer);
_damage = _damageCollisionSettings.damageAmount;
}
private void OnCollisionEnter(Collision other)
{
if (IsServer)
{
if (other.gameObject.layer == _targetLayer)
{
other.gameObject.GetComponent<PlayerHealth>().decreaseHealth(_damage);
if (gameObject.TryGetComponent(out Slime enemyComponent))
{
TargetingManager.Instance.RemoveEnemyFromTargetingList(enemyComponent);
}
DisableGameObjectClientRpc();
}
}
}
[ClientRpc]
private void DisableGameObjectClientRpc()
{
gameObject.SetActive(false);
}
public static int GetLayerFromLayerMask(LayerMask layerMask)
{
int value = layerMask.value;
if (value == 0) return -1;
int layer = 0;
while (value > 1)
{
value >>= 1;
layer++;
}
return layer;
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: da700a4056d148541bb6d90da82dce78
\ No newline at end of file
using UnityEngine;
[CreateAssetMenu(fileName = "DamageCollisionSettings", menuName = "Scriptable Objects/DamageCollisionSettings")]
public class DamageCollisionSettings : ScriptableObject
{
public int damageAmount;
public LayerMask targetLayer;
}
\ No newline at end of file
fileFormatVersion: 2
guid: 8d2e44d8b8cee4f4ca4cbc5753b50feb
\ No newline at end of file
guid: e8a9dcc599d03e24ab1fe268a8ea7cc1
\ No newline at end of file
using System;
using Unity.Netcode;
using UnityEngine;
......@@ -14,8 +15,8 @@ public class Enemy : NetworkBehaviour
Target = null;
}
public override void OnDestroy()
{
TargetingManager.Instance.RemoveEnemyFromTargetingList(this);
}
// public override void OnDestroy()
// {
// TargetingManager.Instance.RemoveEnemyFromTargetingList(this);
// }
}
\ No newline at end of file
......@@ -46,7 +46,6 @@ public class EnemyAnimator : MonoBehaviour
private void ReceiveTargetAimedEventFromAnimator()
{
Debug.Log("ReceiveTargetAimedEventFromAnimator");
receiveTargetAimedEventFromAnimator?.Invoke();
}
......@@ -57,7 +56,6 @@ public class EnemyAnimator : MonoBehaviour
private void ReceiveTargetShotEventFromAnimator()
{
Debug.Log("ReceiveTargetShotEventFromAnimator");
receiveTargetShotEventFromAnimator?.Invoke();
}
......
......@@ -7,4 +7,5 @@ public class EnemySettings : ScriptableObject
public int detectionRange = 7;
public int shootingRange = 20;
public float shootingDelay = 1f;
public int speed = 5;
}
\ No newline at end of file
......@@ -10,12 +10,8 @@ public class Rogue : AnimatedEnemy
[SerializeField] private GameObject weapon;
private Arrow _arrowComponent;
private float _shootingTimer;
private bool _isCrossbowLoaded;
private bool _isAiming;
private Vector3 _lookingDirection;
private bool _targetLocked;
private Collider[] hitColliders;
private NetworkObject _instantiatedArrow;
private Transform _arrowSpawnPoint;
private Rigidbody _arrowRigidbody;
......@@ -66,8 +62,6 @@ public class Rogue : AnimatedEnemy
InstantiateArrow();
hitColliders = new Collider[NetworkManager.Singleton.ConnectedClients.Count];
}
......@@ -79,7 +73,6 @@ public class Rogue : AnimatedEnemy
_arrowComponent = _instantiatedArrow.GetComponent<Arrow>();
_arrowRigidbody = _instantiatedArrow.GetComponent<Rigidbody>();
_arrowComponent.SetTargetTransform(_arrowSpawnPoint.transform);
_isCrossbowLoaded = true;
}
private void Update()
......@@ -97,36 +90,16 @@ public class Rogue : AnimatedEnemy
}
}
protected override void AimAtTarget()
{
if (!_instantiatedArrow.gameObject.activeSelf)
{
_enemyManager.enemyEvents.EnemyReload();
return;
}
// [ServerRpc]
// private void ScanForCollisionServerRpc()
// {
// if (_isCrossbowLoaded && _shootingTimer <= 0)
// {
// int numColliders = Physics.OverlapSphereNonAlloc(transform.position, enemySettings.detectionRange,
// hitColliders,
// enemySettings.targetLayer);
// if (numColliders > 0)
// {
// Collider closestCollider = null;
// float closestDistance = float.MaxValue;
//
// for (int i = 0; i < numColliders; i++)
// {
// float distance = Vector3.Distance(transform.position, hitColliders[i].transform.position);
// if (distance < closestDistance)
// {
// closestDistance = distance;
// closestCollider = hitColliders[i];
// }
// }
//
// _targetLocked = true;
// GameObject targetObject = closestCollider.gameObject;
//
// }
// }
// }
base.AimAtTarget();
}
private void RotateTowardsTarget()
{
......@@ -141,7 +114,6 @@ public class Rogue : AnimatedEnemy
{
_enemyManager.enemyEvents.EnemyAttack();
_shootingTimer = enemySettings.shootingDelay;
_isCrossbowLoaded = false;
}
private void TargetShotEvent()
......@@ -155,7 +127,16 @@ public class Rogue : AnimatedEnemy
{
_arrowRigidbody.linearVelocity = Vector3.zero;
_arrowComponent.SetTargetTransform(_arrowSpawnPoint.transform);
_targetLocked = false;
_isCrossbowLoaded = true;
NetworkObjectReference arrowReference = _instantiatedArrow;
EnableArrowClientRpc(arrowReference);
}
[ClientRpc]
private void EnableArrowClientRpc(NetworkObjectReference arrowReference)
{
if (arrowReference.TryGet(out NetworkObject arrowToEnable))
{
arrowToEnable.gameObject.SetActive(true);
}
}
}
\ No newline at end of file
using Unity.Netcode;
using UnityEngine;
public class Slime : Enemy
{
private Vector3 _targetPosition;
[SerializeField] private EnemySettings enemySettings;
private Rigidbody _rigidbody;
private int _targetLayer;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
public override void OnNetworkSpawn()
{
if (IsServer)
{
InitializeEnemy(enemySettings.detectionRange, enemySettings.targetLayer);
}
}
protected override void InitializeEnemy(int detectionRange, LayerMask targetLayerMask)
{
base.InitializeEnemy(detectionRange, targetLayerMask);
_rigidbody = GetComponent<Rigidbody>();
}
// Update is called once per frame
void Update()
private void Update()
{
if (Target)
{
_rigidbody.linearVelocity = (Target.position - transform.position).normalized * enemySettings.speed;
}
}
}
\ No newline at end of file
using System.Collections;
using Unity.Netcode;
using UnityEditor;
using UnityEngine;
public class EnemySpawner : MonoBehaviour
public class EnemySpawnerManager : NetworkBehaviour
{
[SerializeField] private GameObject _rogueEnemyPrefab;
[SerializeField] private GameObject _slimeEnemyPrefab;
......@@ -29,29 +28,17 @@ public class EnemySpawner : MonoBehaviour
#endregion
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
OnServerStartedServerRpc();
//NetworkManager.Singleton.OnServerStarted += OnServerStartedServerRpc;
// NetworkManager.Singleton.OnServerStopped += OnServerStoppedServerRpc;
}
[ServerRpc]
private void OnServerStoppedServerRpc(bool state)
{
if (!state)
if (IsServer)
{
// NetworkManager.Singleton.OnServerStarted -= OnServerStartedServerRpc;
// NetworkManager.Singleton.OnServerStopped -= OnServerStoppedServerRpc;
OnServerStarted();
}
}
[ServerRpc]
private void OnServerStartedServerRpc()
private void OnServerStarted()
{
Debug.Log("Setting up enemy spawner");
// ApplyExistingEnemyArrows();
FindEnemySpawnPositions();
FindEnemyConfig();
......@@ -73,7 +60,7 @@ public class EnemySpawner : MonoBehaviour
var random = new Unity.Mathematics.Random((uint)System.DateTime.Now.Ticks);
Vector3 spawnPosition = GetSpawnPosition(_spawnedRogueEnemyCount);
spawnPosition += new Vector3(random.NextFloat(-5f, 5f), 0, random.NextFloat(-5f, 5f));
SpawnRogueEnemyServerRpc(spawnPosition);
SpawnRogueEnemy(spawnPosition);
_spawnedRogueEnemyCount++;
_RogueEnemySpawnTimer = _RogueEnemySpawnCooldown;
}
......@@ -92,8 +79,7 @@ public class EnemySpawner : MonoBehaviour
var random = new Unity.Mathematics.Random((uint)System.DateTime.Now.Ticks);
Vector3 spawnPosition = GetSpawnPosition(_spawnedSlimeEnemyCount);
spawnPosition += new Vector3(random.NextFloat(-5f, 5f), 0, random.NextFloat(-5f, 5f));
SpawnSlimeEnemyServerRpc(spawnPosition);
SpawnSlimeEnemy(spawnPosition);
_spawnedSlimeEnemyCount++;
_SlimeEnemySpawnTimer = _SlimeEnemySpawnCooldown;
}
......@@ -103,8 +89,7 @@ public class EnemySpawner : MonoBehaviour
}
}
[ServerRpc]
private void SpawnRogueEnemyServerRpc(Vector3 spawnPosition)
private void SpawnRogueEnemy(Vector3 spawnPosition)
{
if (_rogueEnemyPrefab != null)
{
......@@ -112,23 +97,17 @@ public class EnemySpawner : MonoBehaviour
Instantiate(_rogueEnemyPrefab, spawnPosition, Quaternion.identity, gameObject.transform);
spawnedEnemy.GetComponent<NetworkObject>().Spawn();
TargetingManager.Instance.AddEnemyToTargetingList(spawnedEnemy.GetComponent<Enemy>());
// SpawnEnemyForClientRpc(spawnedEnemy);
}
}
//
// [ClientRpc]
// private void SpawnEnemyForClientRpc(GameObject spawnedEnemy)
// {
// }
[ServerRpc]
private void SpawnSlimeEnemyServerRpc(Vector3 spawnPosition)
private void SpawnSlimeEnemy(Vector3 spawnPosition)
{
if (_slimeEnemyPrefab != null)
{
GameObject spawnedEnemy = Instantiate(_slimeEnemyPrefab, spawnPosition, Quaternion.identity);
GameObject spawnedEnemy =
Instantiate(_slimeEnemyPrefab, spawnPosition, Quaternion.identity, gameObject.transform);
spawnedEnemy.GetComponent<NetworkObject>().Spawn();
// spawnedEnemy.GetComponent<Enemy>().InitializeEnemy();
TargetingManager.Instance.AddEnemyToTargetingList(spawnedEnemy.GetComponent<Enemy>());
}
}
......@@ -149,23 +128,6 @@ public class EnemySpawner : MonoBehaviour
_SlimeEnemySpawnTimer = _SlimeEnemySpawnCooldown;
}
// private void ApplyExistingEnemyArrows()
// {
// // SpawnEnemyArrows();
// var enemiesTransform = GameObject.Find("Enemies")?.transform;
// if (enemiesTransform != null)
// {
// foreach (Transform child in enemiesTransform)
// {
// var enemy = child.GetComponent<Rogue>();
// if (enemy != null)
// {
// enemy.InstantiateArrowServer();
// }
// }
// }
// }
private void FindEnemySpawnPositions()
{
......@@ -178,7 +140,6 @@ public class EnemySpawner : MonoBehaviour
}
_enemySpawnLocations = new Transform[spawnLocationParent.transform.childCount];
for (int i = 0; i < spawnLocationParent.transform.childCount; i++)
{
_enemySpawnLocations[i] = spawnLocationParent.transform.GetChild(i);
......@@ -190,20 +151,4 @@ public class EnemySpawner : MonoBehaviour
spawnPositions[i] = _enemySpawnLocations[i].position;
}
}
// private void SpawnEnemyArrows()
// {
// var enemiesTransform = GameObject.Find("Enemies")?.transform;
// if (enemiesTransform != null)
// {
// foreach (Transform child in enemiesTransform)
// {
// var enemy = child.GetComponent<Enemy>();
// if (enemy != null)
// {
// enemy.InstantiateArrowServer();
// }
// }
// }
// }
}
\ No newline at end of file
using System;
using UnityEngine;
#if UNITY_EDITOR
public class SpawnLocationVisual : MonoBehaviour
{
public float radius = 5.0f; // Radius to draw around each child
// Draw Gizmos in the editor
void OnDrawGizmos()
{
foreach (Transform child in transform)
{
Gizmos.color = Color.red;
Gizmos.DrawWireSphere(child.position, radius);
}
}
}
#endif
\ No newline at end of file
fileFormatVersion: 2
guid: a22d62560c8f61a4fbd55236631e8334
\ No newline at end of file
using Unity.Netcode;
using UnityEngine;
public class ClientManager : NetworkBehaviour
{
private void Start()
{
if (IsClient && !IsServer)
{
RequestTimerState();
}
}
private void RequestTimerState()
{
if (NetworkManager.Singleton.IsConnectedClient)
{
GameManager gameManager = FindFirstObjectByType<GameManager>();
if (gameManager != null)
{
gameManager.RequestTimerStateServerRpc();
}
else
{
Debug.LogError("GameManager not found.");
}
}
}
}
\ No newline at end of file
......@@ -11,7 +11,7 @@ using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class ClientConnectionManager : NetworkBehaviour
public class ConnectionManager : NetworkBehaviour
{
[SerializeField] private GameObject _WaitingPlayerPanel;
[SerializeField] private TextMeshProUGUI _waitingText;
......@@ -33,7 +33,8 @@ public class ClientConnectionManager : NetworkBehaviour
[SerializeField] private int _gameStartCountDownTime;
[SerializeField] private float _slimeSpawnCooldownTime;
[SerializeField] private float _rogueSpawnCooldownTime;
[SerializeField] private GameObject playerPrefab; // Set the name in the Inspector
[SerializeField] private GameObject playerPrefab;
[SerializeField] private int playerHealth;
[SerializeField] private int _startGameCountdownTimer = 10;
......@@ -196,6 +197,13 @@ public class ClientConnectionManager : NetworkBehaviour
UnloadSceneClientRpc("ConnectionScene");
SpawnPlayers();
InvokeDestroyGameObjectClientRpc();
Destroy(gameObject);
}
[ClientRpc]
private void InvokeDestroyGameObjectClientRpc()
{
Destroy(gameObject);
}
......@@ -219,17 +227,23 @@ public class ClientConnectionManager : NetworkBehaviour
private void OnSceneLoadCompleted(string scenename, LoadSceneMode loadscenemode, List<ulong> clientscompleted,
List<ulong> clientstimedout)
{
if (IsServer)
{
Scene gameScene = SceneManager.GetSceneByName(scenename);
NetworkManager.Singleton.SceneManager.OnLoadEventCompleted -= OnSceneLoadCompleted;
SceneManager.MoveGameObjectToScene(NetworkManager.Singleton.gameObject, gameScene);
SceneManager.MoveGameObjectToScene(gameConfigHolder, gameScene);
SceneManager.SetActiveScene(gameScene);
CheckSceneLoadCompletion(connectedClientIds, clientscompleted, clientstimedout);
}
NetworkManager.Singleton.SceneManager.OnLoadEventCompleted -= OnSceneLoadCompleted;
Scene gameScene = SceneManager.GetSceneByName(scenename);
SceneManager.MoveGameObjectToScene(gameConfigHolder, gameScene);
CheckSceneLoadCompletion(connectedClientIds, clientscompleted, clientstimedout);
MoveNetworkManagerToNewSceneClientRpc(scenename);
}
[ClientRpc]
private void MoveNetworkManagerToNewSceneClientRpc(string scenename)
{
Scene scene = SceneManager.GetSceneByName(scenename);
SceneManager.MoveGameObjectToScene(NetworkManager.Singleton.gameObject, scene);
SceneManager.SetActiveScene(scene);
}
private void CheckSceneLoadCompletion(List<ulong> initialConnectedClientIds, List<ulong> clientsCompleted,
List<ulong> clientsTimedOut)
{
......@@ -285,7 +299,7 @@ public class ClientConnectionManager : NetworkBehaviour
{
foreach (ulong clientId in connectedClientIds)
{
Vector3 spawnPosition = Vector3.zero;
Vector3 spawnPosition = new Vector3(Random.Range(-5, 5), 0, Random.Range(-5, 5));
Quaternion spawnRotation = Quaternion.identity;
GameObject spawnedPlayer = Instantiate(playerPrefab, spawnPosition, spawnRotation);
......@@ -294,6 +308,7 @@ public class ClientConnectionManager : NetworkBehaviour
if (networkObject != null)
{
networkObject.SpawnAsPlayerObject(clientId, true);
spawnedPlayer.GetComponent<PlayerHealth>().InitializePlayerHealth(playerHealth);
}
else
{
......
using System;
using System.Collections;
using System.Linq;
using TMPro;
using Unity.Netcode;
using UnityEngine;
public class RespawnManager : NetworkBehaviour
{
[SerializeField] private GameObject _respawnPlayerPanel;
[SerializeField] private TextMeshProUGUI _countdownTimeText;
[SerializeField] private int _playerDeadLayer = 11;
public static RespawnManager Instance { get; private set; }
private int _respawnTime = 10;
private int _health = 100;
private Coroutine _countdownCoroutine;
private void Awake()
{
if (Instance == null)
{
Instance = this;
}
else
{
Destroy(gameObject);
}
}
public void StartRespawnPlayer(GameObject player)
{
if (IsServer)
{
NetworkObject playerNetworkObject = player.GetComponent<NetworkObject>();
if (playerNetworkObject != null)
{
ulong clientId = playerNetworkObject.OwnerClientId;
ShowRespawnUIClientRpc(clientId);
TurnOffPlayerControlsClientRpc(clientId);
player.layer = _playerDeadLayer;
player.transform.rotation = Quaternion.Euler(90, 0, 0);
}
}
}
[ClientRpc]
private void TurnOffPlayerControlsClientRpc(ulong clientId)
{
if (NetworkManager.Singleton.LocalClientId == clientId)
{
NetworkObject localPlayerNetworkObject = NetworkManager.Singleton.SpawnManager.GetLocalPlayerObject();
if (localPlayerNetworkObject != null &&
localPlayerNetworkObject.TryGetComponent<PlayerManager>(out var playerManager))
{
playerManager.inputReader.TurnOffPlayerControls();
}
}
}
[ClientRpc]
private void ShowRespawnUIClientRpc(ulong clientId)
{
if (NetworkManager.Singleton.LocalClientId == clientId)
{
if (_respawnPlayerPanel != null && _countdownTimeText != null)
{
_respawnPlayerPanel.SetActive(true);
_countdownCoroutine = StartCoroutine(RespawnCountdownCoroutine());
}
}
}
private IEnumerator RespawnCountdownCoroutine()
{
int currentTime = _respawnTime;
while (currentTime > 0)
{
_countdownTimeText.text = currentTime.ToString();
yield return new WaitForSeconds(1f);
currentTime--;
}
_countdownTimeText.text = "0";
ulong clientId = NetworkManager.Singleton.LocalClientId;
DespawnPlayerServerRpc(clientId);
RequestSpawnPlayerServerRpc(clientId);
if (_respawnPlayerPanel != null)
{
_respawnPlayerPanel.SetActive(false);
}
if (_countdownCoroutine != null)
{
StopCoroutine(_countdownCoroutine);
_countdownCoroutine = null;
}
}
[ServerRpc(RequireOwnership = false)]
private void DespawnPlayerServerRpc(ulong clientId)
{
NetworkObject playerNetworkObjectToRemove =
NetworkManager.Singleton.SpawnManager.GetPlayerNetworkObject(clientId);
if (playerNetworkObjectToRemove.TryGetComponent<PlayerHealth>(out var playerHealth))
{
playerHealth.InitiateHealthBarDestructionClientRpc();
}
playerNetworkObjectToRemove.Despawn();
}
[ServerRpc(RequireOwnership = false)]
private void RequestSpawnPlayerServerRpc(ulong clientId)
{
NetworkPrefabsList networkPrefabsList = NetworkManager.NetworkConfig.Prefabs.NetworkPrefabsLists[0];
NetworkPrefab networkPrefabEntry =
networkPrefabsList.PrefabList.FirstOrDefault(prefab =>
prefab.Prefab.name == "Player");
GameObject playerInstance =
Instantiate(networkPrefabEntry.Prefab, Vector3.zero,
Quaternion.identity);
NetworkObject playerNetworkObject = playerInstance.GetComponent<NetworkObject>();
if (playerNetworkObject != null)
{
playerNetworkObject.SpawnAsPlayerObject(clientId, true);
playerInstance.GetComponent<PlayerManager>().inputReader.TurnOnPlayerControls();
playerInstance.GetComponent<PlayerHealth>().InitializePlayerHealth(_health);
}
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: a58a38ffa1fae6f45b64398121459d3e
\ No newline at end of file
guid: 499fcf6736d96b64d89f839fb5ce96ed
\ No newline at end of file
using System.Collections.Generic;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.PlayerLoop;
public class TargetingManager : NetworkBehaviour
{
public static TargetingManager Instance { get; private set; }
private Collider[] playerColliders;
private List<Enemy> enemies;
1
private List<Enemy> enemies = new List<Enemy>();
public override void OnNetworkSpawn()
{
base.OnNetworkSpawn();
......@@ -32,16 +31,31 @@ public class TargetingManager : NetworkBehaviour
{
if (enemy != null)
{
int numColliders = Physics.OverlapSphereNonAlloc(enemy.gameObject.transform.position,
int numColliders = Physics.OverlapSphereNonAlloc(enemy.transform.position,
enemy.DetectionRadius,
playerColliders, enemy.TargetLayerMask);
if (numColliders > 0)
{
Transform closestPlayer = null;
float closestDistanceSqr = Mathf.Infinity;
for (int i = 0; i < numColliders; i++)
{
enemy.Target = playerColliders[i].gameObject.transform;
float distanceSqr = (playerColliders[i].transform.position - enemy.transform.position)
.sqrMagnitude;
if (distanceSqr < closestDistanceSqr)
{
closestDistanceSqr = distanceSqr;
closestPlayer = playerColliders[i].transform;
}
}
enemy.Target = closestPlayer;
}
else if (enemy.Target)
{
enemy.Target = null;
}
}
}
......@@ -66,6 +80,5 @@ public class TargetingManager : NetworkBehaviour
}
Instance = this;
DontDestroyOnLoad(gameObject);
}
}
\ No newline at end of file
......@@ -4,14 +4,8 @@ using UnityEngine.UIElements;
public class Arrow : MonoBehaviour
{
public BoxCollider _boxCollider;
private Transform _targetTransform;
void Start()
{
_boxCollider = GetComponent<BoxCollider>();
}
private void Update()
{
FollowTarget();
......
using System;
using Unity.Netcode;
using UnityEngine;
......@@ -69,9 +68,5 @@ public class PlayerAnimator : NetworkBehaviour
private void SetPlayerDefence(bool state)
{
_animator.SetBool(IS_DEFENDING, state);
// if (state)
// {
// _animator.CrossFade(IS_DEFENDING, 1f);
// }
}
}
\ No newline at end of file
using Unity.Netcode;
using UnityEngine;
using UnityEngine.UI;
public class PlayerHealth : NetworkBehaviour
{
[SerializeField] private GameObject _healthCanvas;
private Slider _healthSlider;
private NetworkVariable<int> playerHealth = new NetworkVariable<int>();
private Vector3 _healthBarOffset;
private bool isRespawning;
public override void OnNetworkSpawn()
{
_healthBarOffset = _healthCanvas.transform.localPosition;
_healthCanvas.transform.SetParent(null);
_healthSlider = _healthCanvas.GetComponentInChildren<Slider>();
}
[ClientRpc]
private void StartHealthBarClientRpc(int health)
{
_healthSlider.maxValue = health;
}
public void InitializePlayerHealth(int health)
{
if (IsServer)
{
isRespawning = false;
playerHealth.Value = health;
StartHealthBarClientRpc(playerHealth.Value);
}
}
private void Update()
{
_healthCanvas.transform.position = gameObject.transform.position + _healthBarOffset;
_healthSlider.value = playerHealth.Value;
}
public void decreaseHealth(int health)
{
if (IsServer)
{
if (isRespawning) return;
playerHealth.Value -= health;
if (playerHealth.Value <= 0)
{
isRespawning = true;
RespawnManager.Instance.StartRespawnPlayer(gameObject);
}
}
}
// [ClientRpc]
// private void UpdateHealthClientRpc(int curHealth)
// {
// _healthSlider.value = curHealth;
// }
// private void OnDestroy()
// {
// if (IsServer)
// {
// Destroy(_healthCanvas);
//
// DestroyHealthBarClientRpc();
// }
// }
//
// [ClientRpc]
// private void DestroyHealthBarClientRpc()
// {
// if (_healthCanvas != null)
// {
// Destroy(_healthCanvas);
// }
// else
// {
// Debug.LogError("Cant find canvas");
// }
// }
[ClientRpc]
public void InitiateHealthBarDestructionClientRpc()
{
Destroy(_healthCanvas);
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: 22ca66dfc1d15b0419d82e3111bf5c18
\ No newline at end of file
guid: abb23af4284f3cd45a27c741eefde4de
\ No newline at end of file
using UnityEngine;
using System.Collections;
using TMPro;
using Unity.Netcode;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class GameStartUIControllerGO : MonoBehaviour
{
[SerializeField] private GameObject _beginGamePanel;
[SerializeField] private GameObject _confirmQuitPanel;
[SerializeField] private GameObject _countdownPanel;
[SerializeField] private Button _quitWaitingButton;
[SerializeField] private Button _confirmQuitButton;
[SerializeField] private Button _cancelQuitButton;
[SerializeField] private TMP_Text _waitingText;
[SerializeField] private TMP_Text _countdownText;
private NetworkManager _networkManager;
private void OnEnable()
{
_beginGamePanel.SetActive(true);
_confirmQuitPanel.SetActive(false);
_countdownPanel.SetActive(false);
_quitWaitingButton.onClick.AddListener(AttemptQuitWaiting);
_confirmQuitButton.onClick.AddListener(ConfirmQuit);
_cancelQuitButton.onClick.AddListener(CancelQuit);
_networkManager = NetworkManager.Singleton;
if (_networkManager != null)
{
// Subscribe to a custom event or check NetworkManager state directly
// We'll assume you have a way to track players remaining on the server
// and update clients via RPC or NetworkVariable.
// Example: Subscribe to an event that the server triggers
// if (NetworkGameManager.Instance != null)
// {
// NetworkGameManager.Instance.OnPlayersRemainingToStartUpdated += UpdatePlayerRemainingText;
// NetworkGameManager.Instance.OnStartGameCountdown += BeginCountdown;
// }
//
// // Example: If countdown is a NetworkVariable on a NetworkBehaviour
// if (NetworkGameManager.Instance != null)
// {
// NetworkGameManager.Instance.CountdownTime.OnValueChanged += UpdateCountdownTextFromNetworkVariable;
// if (NetworkGameManager.Instance.IsCountdownActive.Value)
// {
// BeginCountdown();
// }
// }
}
else
{
Debug.LogError("NetworkManager not found!");
}
}
private void OnDisable()
{
_quitWaitingButton.onClick.RemoveAllListeners();
_confirmQuitButton.onClick.RemoveAllListeners();
_cancelQuitButton.onClick.RemoveAllListeners();
//
// if (NetworkGameManager.Instance != null)
// {
// NetworkGameManager.Instance.OnPlayersRemainingToStartUpdated -= UpdatePlayerRemainingText;
// NetworkGameManager.Instance.OnStartGameCountdown -= BeginCountdown;
// NetworkGameManager.Instance.CountdownTime.OnValueChanged -= UpdateCountdownTextFromNetworkVariable;
// }
}
private void UpdatePlayerRemainingText(int playersRemainingToStart)
{
var playersText = playersRemainingToStart == 1 ? "player" : "players";
_waitingText.text = $"Waiting for {playersRemainingToStart.ToString()} more {playersText} to join...";
}
private void UpdateCountdownText(int countdownTime)
{
_countdownText.text = countdownTime.ToString();
}
private void UpdateCountdownTextFromNetworkVariable(int previousValue, int newValue)
{
_countdownText.text = newValue.ToString();
}
private void AttemptQuitWaiting()
{
_beginGamePanel.SetActive(false);
_confirmQuitPanel.SetActive(true);
}
private void ConfirmQuit()
{
StartCoroutine(DisconnectDelay());
}
IEnumerator DisconnectDelay()
{
yield return new WaitForSeconds(1f);
if (_networkManager != null && _networkManager.IsClient)
{
_networkManager.Shutdown();
SceneManager.LoadScene(0); // Load your main menu scene
}
else if (_networkManager != null && _networkManager.IsServer)
{
_networkManager.Shutdown();
SceneManager.LoadScene(0); // Load your main menu scene
}
else
{
SceneManager.LoadScene(0); // If no network is active, just go to main menu
}
}
private void CancelQuit()
{
_confirmQuitPanel.SetActive(false);
_beginGamePanel.SetActive(true);
}
private void BeginCountdown()
{
_beginGamePanel.SetActive(false);
_confirmQuitPanel.SetActive(false);
_countdownPanel.SetActive(true);
}
private void EndCountdown()
{
_countdownPanel.SetActive(false);
}
}
\ No newline at end of file
using System;
using Unity.Netcode;
using UnityEngine;
using UnityEngine.UI;
public class TestingConnectionUI : MonoBehaviour
{
[SerializeField] private Button startHostButton;
[SerializeField] private Button startClientButton;
private void Awake()
{
startHostButton.onClick.AddListener(() =>
{
NetworkManager.Singleton.StartHost();
Hide();
});
startClientButton.onClick.AddListener(() =>
{
NetworkManager.Singleton.StartClient();
Hide();
});
}
private void Hide()
{
gameObject.SetActive(false);
}
}
\ No newline at end of file
fileFormatVersion: 2
guid: dc695439125c44a4190bdc008aa5a0fc
guid: 2ec6e89ff98aa664094ae9d16b105c45
PrefabImporter:
externalObjects: {}
userData:
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &3889523558811156720
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5059658329123755283}
- component: {fileID: 1707247849784179353}
- component: {fileID: 5116499677113064615}
m_Layer: 5
m_Name: Start_Game
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!224 &5059658329123755283
RectTransform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3889523558811156720}
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 0}
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: 262.3946, y: 108.8129}
m_Pivot: {x: 0.5, y: 0.5}
--- !u!222 &1707247849784179353
CanvasRenderer:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3889523558811156720}
m_CullTransparentMesh: 1
--- !u!114 &5116499677113064615
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 3889523558811156720}
m_Enabled: 0
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: f4688fdb7df04437aeb418b961361dc5, type: 3}
m_Name:
m_EditorClassIdentifier:
m_Material: {fileID: 0}
m_Color: {r: 1, g: 1, b: 1, a: 1}
m_RaycastTarget: 1
m_RaycastPadding: {x: 0, y: 0, z: 0, w: 0}
m_Maskable: 1
m_OnCullStateChanged:
m_PersistentCalls:
m_Calls: []
m_text: Start Game
m_isRightToLeft: 0
m_fontAsset: {fileID: 11400000, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_sharedMaterial: {fileID: 2180264, guid: 8f586378b4e144a9851e7b34d9b748ee, type: 2}
m_fontSharedMaterials: []
m_fontMaterial: {fileID: 0}
m_fontMaterials: []
m_fontColor32:
serializedVersion: 2
rgba: 1166126335
m_fontColor: {r: 1, g: 0.6733512, b: 0.504717, a: 0.27058825}
m_enableVertexGradient: 0
m_colorMode: 3
m_fontColorGradient:
topLeft: {r: 1, g: 1, b: 1, a: 1}
topRight: {r: 1, g: 1, b: 1, a: 1}
bottomLeft: {r: 1, g: 1, b: 1, a: 1}
bottomRight: {r: 1, g: 1, b: 1, a: 1}
m_fontColorGradientPreset: {fileID: 0}
m_spriteAsset: {fileID: 0}
m_tintAllSprites: 0
m_StyleSheet: {fileID: 0}
m_TextStyleHashCode: -1183493901
m_overrideHtmlColors: 0
m_faceColor:
serializedVersion: 2
rgba: 4294967295
m_fontSize: 50.3
m_fontSizeBase: 50.3
m_fontWeight: 400
m_enableAutoSizing: 0
m_fontSizeMin: 18
m_fontSizeMax: 72
m_fontStyle: 0
m_HorizontalAlignment: 2
m_VerticalAlignment: 512
m_textAlignment: 65535
m_characterSpacing: 0
m_wordSpacing: 0
m_lineSpacing: 0
m_lineSpacingMax: 0
m_paragraphSpacing: 0
m_charWidthMaxAdj: 0
m_TextWrappingMode: 1
m_wordWrappingRatios: 0.4
m_overflowMode: 0
m_linkedTextComponent: {fileID: 0}
parentLinkedComponent: {fileID: 0}
m_enableKerning: 0
m_ActiveFontFeatures: 6e72656b
m_enableExtraPadding: 0
checkPaddingRequired: 0
m_isRichText: 1
m_EmojiFallbackSupport: 1
m_parseCtrlCharacters: 1
m_isOrthographic: 1
m_isCullingEnabled: 0
m_horizontalMapping: 0
m_verticalMapping: 0
m_uvLineOffset: 0
m_geometrySortingOrder: 0
m_IsTextObjectScaleStatic: 0
m_VertexBufferAutoSizeReduction: 0
m_useMaxVisibleDescender: 1
m_pageToDisplay: 1
m_margin: {x: 0, y: 0, z: 0, w: 0}
m_isUsingLegacyAnimationComponent: 0
m_isVolumetricText: 0
m_hasFontAssetChanged: 0
m_baseMaterial: {fileID: 0}
m_maskOffset: {x: 0, y: 0, z: 0, w: 0}
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6866275124911934084
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1774531537854147144}
- component: {fileID: 2847495381736913473}
m_Layer: 0
m_Name: EnemySpawner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1774531537854147144
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6866275124911934084}
serializedVersion: 2
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5208134106439944552}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2847495381736913473
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6866275124911934084}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb139732cb33148458fab05d76c66791, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &7258924596401886573
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5208134106439944552}
m_Layer: 0
m_Name: Enemies
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5208134106439944552
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7258924596401886573}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1.9441636, y: 0.5603608, z: 1.2710799}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 4975799049458455584}
- {fileID: 6020572084117474320}
m_Father: {fileID: 1774531537854147144}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &4856874394301556660
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 5208134106439944552}
m_Modifications:
- target: {fileID: 273039182630653378, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_Name
value: Rogue
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalPosition.x
value: -29.53
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalPosition.z
value: 11.47
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 90
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7102490594246651703, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: GlobalObjectIdHash
value: 1523420517
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
--- !u!4 &4975799049458455584 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
m_PrefabInstance: {fileID: 4856874394301556660}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6190159418551631748
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 5208134106439944552}
m_Modifications:
- target: {fileID: 273039182630653378, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_Name
value: Rogue (1)
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalPosition.x
value: -29.49
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalPosition.z
value: 3.58
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalRotation.w
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 90
objectReference: {fileID: 0}
- target: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 7102490594246651703, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
propertyPath: GlobalObjectIdHash
value: 1523420517
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
--- !u!4 &6020572084117474320 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
m_PrefabInstance: {fileID: 6190159418551631748}
m_PrefabAsset: {fileID: 0}
......@@ -256,7 +256,7 @@ PrefabInstance:
addedObject: {fileID: 5907138048780906194}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: a577d9f96e34b5b4bb53a563b9fcf3e9, type: 3}
insertIndex: -1
addedObject: {fileID: 4697097011662800712}
addedObject: {fileID: 7859416863419427901}
m_SourcePrefab: {fileID: 100100000, guid: a577d9f96e34b5b4bb53a563b9fcf3e9, type: 3}
--- !u!4 &5640393319647876343 stripped
Transform:
......@@ -302,7 +302,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: f756dd42a94556a4489ea5f3fa82f1c2, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &4697097011662800712
--- !u!114 &7859416863419427901
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
......@@ -311,7 +311,7 @@ MonoBehaviour:
m_GameObject: {fileID: 6289059839580298696}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: ba9c15d5ab0232141b58b853ca3697fb, type: 3}
m_Script: {fileID: 11500000, guid: e8d0727d5ae3244e3b569694d3912374, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
......@@ -337,6 +337,13 @@ MonoBehaviour:
TransitionDuration: 0.25
TriggerNameHash: 1080829965
TransitionIndex: 0
- IsCrossFadeExit: 0
Layer: 0
OriginatingState: 1080829965
DestinationState: -1525363869
TransitionDuration: 0.25
TriggerNameHash: -1525363869
TransitionIndex: 0
m_Animator: {fileID: 568773292121004276}
--- !u!4 &6632933873018439538 stripped
Transform:
......
......@@ -27,7 +27,7 @@ AnimatorStateMachine:
m_StateMachineTransitions: {}
m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: -20, y: 110, z: 0}
m_EntryPosition: {x: -290, y: 550, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: -3853274732491035516}
......
......@@ -14,7 +14,9 @@ GameObject:
- component: {fileID: 7639242156254445465}
- component: {fileID: 3234479000206332123}
- component: {fileID: 5394816119229616792}
m_Layer: 0
- component: {fileID: 2649082171887839502}
- component: {fileID: 6070314325824568771}
m_Layer: 10
m_Name: Cube
m_TagString: Untagged
m_Icon: {fileID: 0}
......@@ -59,7 +61,7 @@ Rigidbody:
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 1
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 112
......@@ -97,7 +99,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: d5a57f767e5e46a458fc5d3c628d0cbb, type: 3}
m_Name:
m_EditorClassIdentifier:
GlobalObjectIdHash: 0
GlobalObjectIdHash: 3822488857
InScenePlacedSourceGlobalObjectIdHash: 0
DeferredDespawnTick: 0
Ownership: 1
......@@ -160,9 +162,37 @@ MonoBehaviour:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
NetworkRigidbodyBaseExpanded: 0
UseRigidBodyForMotion: 1
UseRigidBodyForMotion: 0
AutoUpdateKinematicState: 1
AutoSetKinematicOnDespawn: 1
--- !u!114 &2649082171887839502
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2899838405596494908}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 352c4af0caf056747ba8281ba03928ce, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
enemySettings: {fileID: 11400000, guid: 9fdb93bec43a5104295cc3583f523a20, type: 2}
--- !u!114 &6070314325824568771
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 2899838405596494908}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: da700a4056d148541bb6d90da82dce78, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
_damageCollisionSettings: {fileID: 11400000, guid: 6254f67b0b7bc8244b0a1f69fe115a22, type: 2}
--- !u!1 &7494803013719323330
GameObject:
m_ObjectHideFlags: 0
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &6866275124911934084
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1774531537854147144}
- component: {fileID: 2847495381736913473}
m_Layer: 0
m_Name: EnemySpawner
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1774531537854147144
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6866275124911934084}
serializedVersion: 2
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_ConstrainProportionsScale: 0
m_Children:
- {fileID: 5208134106439944552}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &2847495381736913473
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6866275124911934084}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: cb139732cb33148458fab05d76c66791, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
_rogueEnemyPrefab: {fileID: 0}
_slimeEnemyPrefab: {fileID: 0}
--- !u!1 &7258924596401886573
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 5208134106439944552}
m_Layer: 0
m_Name: Enemies
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &5208134106439944552
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7258924596401886573}
serializedVersion: 2
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
m_LocalPosition: {x: -1.9441636, y: 0.5603608, z: 1.2710799}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 1774531537854147144}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
......@@ -10,7 +10,6 @@ GameObject:
m_Component:
- component: {fileID: 7801895876235266027}
- component: {fileID: 6720401888809174077}
- component: {fileID: 2406308509100318415}
m_Layer: 0
m_Name: Managers
m_TagString: Untagged
......@@ -33,6 +32,7 @@ Transform:
m_Children:
- {fileID: 4464205841933766465}
- {fileID: 7869329456827020933}
- {fileID: 6706703742790433198}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6720401888809174077
......@@ -60,21 +60,54 @@ MonoBehaviour:
AutoObjectParentSync: 1
SyncOwnerTransformWhenParented: 1
AllowOwnerToParent: 0
--- !u!114 &2406308509100318415
--- !u!1 &8917911649148835584
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 6706703742790433198}
- component: {fileID: 6280857316363003393}
m_Layer: 0
m_Name: RespawnManager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &6706703742790433198
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8917911649148835584}
serializedVersion: 2
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_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 7801895876235266027}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!114 &6280857316363003393
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4994959905079220019}
m_Enabled: 0
m_GameObject: {fileID: 8917911649148835584}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 9c71552cd67eabf489fab4fe0d80a0f9, type: 3}
m_Script: {fileID: 11500000, guid: 499fcf6736d96b64d89f839fb5ce96ed, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
keyPrefab: {fileID: 8050255731901760503, guid: 1d9ae894a89fd38449f1ce889f52d1ad, type: 3}
startGame: 1
_respawnPlayerPanel: {fileID: 0}
_countdownTimeText: {fileID: 0}
_playerDeadLayer: 11
--- !u!1 &8925114654448909485
GameObject:
m_ObjectHideFlags: 0
......
......@@ -137,8 +137,8 @@ GameObject:
- component: {fileID: 5977278119335250016}
- component: {fileID: -5431455483652452085}
- component: {fileID: 6323309021802201727}
- component: {fileID: 911307299827299822}
- component: {fileID: -7974492635611840169}
- component: {fileID: 7701065614916290611}
m_Layer: 9
m_Name: Player
m_TagString: Untagged
......@@ -154,15 +154,16 @@ Transform:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 7039287367920326276}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalRotation: {x: 0.7071068, y: 0, z: 0, w: 0.7071068}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children:
- {fileID: 6006366031235586888}
- {fileID: 5412238459298192479}
- {fileID: 6791121256323726822}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
m_LocalEulerAnglesHint: {x: 90, y: 0, z: 0}
--- !u!54 &3646145694418162658
Rigidbody:
m_ObjectHideFlags: 0
......@@ -288,8 +289,8 @@ MonoBehaviour:
SyncPositionX: 1
SyncPositionY: 0
SyncPositionZ: 1
SyncRotAngleX: 0
SyncRotAngleY: 1
SyncRotAngleX: 1
SyncRotAngleY: 0
SyncRotAngleZ: 0
SyncScaleX: 0
SyncScaleY: 0
......@@ -334,7 +335,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
inputReader: {fileID: 11400000, guid: fae963ae99ce6d14d8bbcd54becb58d7, type: 2}
--- !u!114 &911307299827299822
--- !u!114 &-7974492635611840169
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
......@@ -343,11 +344,13 @@ MonoBehaviour:
m_GameObject: {fileID: 7039287367920326276}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 8d2e44d8b8cee4f4ca4cbc5753b50feb, type: 3}
m_Script: {fileID: 11500000, guid: 5dee285952d3d7f43936f433ec54e262, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
--- !u!114 &-7974492635611840169
playerRightHand: {fileID: 0}
playerLeftHand: {fileID: 0}
--- !u!114 &7701065614916290611
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
......@@ -356,12 +359,11 @@ MonoBehaviour:
m_GameObject: {fileID: 7039287367920326276}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 5dee285952d3d7f43936f433ec54e262, type: 3}
m_Script: {fileID: 11500000, guid: abb23af4284f3cd45a27c741eefde4de, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
playerRightHand: {fileID: 0}
playerLeftHand: {fileID: 0}
_healthCanvas: {fileID: 8254614343102721397}
--- !u!1 &8839871738369281743
GameObject:
m_ObjectHideFlags: 0
......@@ -457,6 +459,121 @@ Transform:
- {fileID: 6288134246550524770}
m_Father: {fileID: 2637631208202168134}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1001 &2611683928832732702
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 2637631208202168134}
m_Modifications:
- target: {fileID: 3347823832458425704, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 3347823832458425704, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 6246730936639062891, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_Name
value: HealthBarCanvas
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_Pivot.x
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_Pivot.y
value: 0.5
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_AnchorMax.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_AnchorMax.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_AnchorMin.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_AnchorMin.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_SizeDelta.x
value: 4
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_SizeDelta.y
value: 1000
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalRotation.w
value: 1
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalRotation.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalRotation.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_AnchoredPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_AnchoredPosition.y
value: 3
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
--- !u!224 &6006366031235586888 stripped
RectTransform:
m_CorrespondingSourceObject: {fileID: 8603131648779679062, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
m_PrefabInstance: {fileID: 2611683928832732702}
m_PrefabAsset: {fileID: 0}
--- !u!1 &8254614343102721397 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 6246730936639062891, guid: 2ec6e89ff98aa664094ae9d16b105c45, type: 3}
m_PrefabInstance: {fileID: 2611683928832732702}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &4224903988600203020
PrefabInstance:
m_ObjectHideFlags: 0
......@@ -589,7 +706,7 @@ PrefabInstance:
addedObject: {fileID: 4874845986567115176}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: 239fd912fdc786a4cb361c17f68877d9, type: 3}
insertIndex: -1
addedObject: {fileID: 3606536086790041357}
addedObject: {fileID: 1995900231566411556}
m_SourcePrefab: {fileID: 100100000, guid: 239fd912fdc786a4cb361c17f68877d9, type: 3}
--- !u!4 &4974693260815384807 stripped
Transform:
......@@ -641,7 +758,7 @@ MonoBehaviour:
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
--- !u!114 &3606536086790041357
--- !u!114 &1995900231566411556
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
......
......@@ -15,7 +15,8 @@ GameObject:
- component: {fileID: 8058832186752717783}
- component: {fileID: 7827702596890055830}
- component: {fileID: 2932515728623351091}
m_Layer: 0
- component: {fileID: 8186436479367965102}
m_Layer: 10
m_Name: Arrow
m_TagString: Untagged
m_Icon: {fileID: 0}
......@@ -77,7 +78,6 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 5029c6c72ae05b4419cabf4c1e96e35f, type: 3}
m_Name:
m_EditorClassIdentifier:
_boxCollider: {fileID: 0}
--- !u!65 &8067914320767520699
BoxCollider:
m_ObjectHideFlags: 0
......@@ -177,6 +177,20 @@ MonoBehaviour:
UseRigidBodyForMotion: 0
AutoUpdateKinematicState: 1
AutoSetKinematicOnDespawn: 1
--- !u!114 &8186436479367965102
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8885891558877188487}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: da700a4056d148541bb6d90da82dce78, type: 3}
m_Name:
m_EditorClassIdentifier:
ShowTopMostFoldoutHeaderGroup: 1
_damageCollisionSettings: {fileID: 11400000, guid: 5ec78105fa51a87499146b383738cd6c, type: 2}
--- !u!1001 &6279328471144270833
PrefabInstance:
m_ObjectHideFlags: 0
......
fileFormatVersion: 2
guid: 50d149932d48f33459fd756fecfc302b
guid: c16c442e7d58502499964a66120f05ce
folderAsset: yes
DefaultImporter:
externalObjects: {}
......
......@@ -337,7 +337,8 @@ MonoBehaviour:
_slimeSpawnCooldownTime: 0.1
_rogueSpawnCooldownTime: 1
playerPrefab: {fileID: 7039287367920326276, guid: 702bb31d143eeaa4792be36b28160445, type: 3}
_startGameCountdownTimer: 1
playerHealth: 100
_startGameCountdownTimer: 10
--- !u!114 &529219308
MonoBehaviour:
m_ObjectHideFlags: 0
......@@ -1104,5 +1105,5 @@ SceneRoots:
- {fileID: 321845824}
- {fileID: 529219306}
- {fileID: 1233896419}
- {fileID: 1670129068}
- {fileID: 5176588386858245479}
- {fileID: 1670129068}
fileFormatVersion: 2
guid: 410f7abc66cc623489d6e75ec776cd2a
guid: c9210174b7033b54aa7acc8f8810a967
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 112000000
......
fileFormatVersion: 2
guid: 43ca200e0b338be44b43f3ac9803e409
guid: 95e5316d0719812478d8bc5db7b1125c
TextureImporter:
internalIDToNameTable: []
externalObjects: {}
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8a9dcc599d03e24ab1fe268a8ea7cc1, type: 3}
m_Name: ArrowDamageCollisionSettings
m_EditorClassIdentifier:
damageAmount: 20
targetLayer:
serializedVersion: 2
m_Bits: 512
fileFormatVersion: 2
guid: 84eabe7aba8647c49b89ea03223acaa3
PrefabImporter:
guid: 5ec78105fa51a87499146b383738cd6c
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
......@@ -15,6 +15,7 @@ MonoBehaviour:
targetLayer:
serializedVersion: 2
m_Bits: 512
detectionRange: 7
detectionRange: 10
shootingRange: 15
shootingDelay: 5
speed: 0
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e8a9dcc599d03e24ab1fe268a8ea7cc1, type: 3}
m_Name: SlimeDamageCollisionSettings
m_EditorClassIdentifier:
damageAmount: 10
targetLayer:
serializedVersion: 2
m_Bits: 512
fileFormatVersion: 2
guid: 6254f67b0b7bc8244b0a1f69fe115a22
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 616231e36fe89cd42bd7aea67dfa0ace, type: 3}
m_Name: SlimeSettings
m_EditorClassIdentifier:
targetLayer:
serializedVersion: 2
m_Bits: 512
detectionRange: 7
shootingRange: 0
shootingDelay: 0
speed: 5
damage: 10
fileFormatVersion: 2
guid: 9fdb93bec43a5104295cc3583f523a20
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:
......@@ -15,8 +15,8 @@ TagManager:
- Destructable
- Pickupable
- Player
-
-
- Enemy
- Dead
-
-
-
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &1
MonoBehaviour:
m_ObjectHideFlags: 53
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a287be6c49135cd4f9b2b8666c39d999, type: 3}
m_Name:
m_EditorClassIdentifier:
assetDefaultFramerate: 60
m_DefaultFrameRate: 60
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment