Commit 465c1a3d by alsunj

Merge branch 'feat/Enemy-shoot-player' into 'main'

Added enemy shooting player with arrow

See merge request alsunj/loputoo!19
parents 168962e3 6a31ab7a
using System;
using DG.Tweening;
using UnityEngine; using UnityEngine;
public class Enemy : MonoBehaviour public class Enemy : MonoBehaviour
{ {
[SerializeField] private EnemySettings enemySettings; [SerializeField] private EnemySettings enemySettings;
[SerializeField] private GameObject arrow;
[SerializeField] private GameObject weapon;
private GameObject _instantiatedArrow;
private Transform _arrowSpawnPoint;
private float _shootingTimer;
private bool _isCrossbowLoaded;
private Collider[]
hitColliders = new Collider[10]; //TODO: this should be the amount of players connected to the network.
private void Start()
{
if (enemySettings == null)
{
throw new Exception("EnemySettings is not set in the inspector");
}
if (arrow == null)
{
throw new Exception("Arrow is not set in the inspector");
}
if (weapon == null)
{
throw new Exception("Weapon is not set in the inspector");
}
_arrowSpawnPoint = weapon.transform.Find("ArrowSpawnPoint");
if (_arrowSpawnPoint == null)
{
throw new Exception("ArrowSpawnPoint is not found as a child of Weapon");
}
InstantiateArrow();
}
private void InstantiateArrow()
{
_instantiatedArrow = Instantiate(arrow, _arrowSpawnPoint.position, _arrowSpawnPoint.rotation);
_instantiatedArrow.transform.SetParent(weapon.transform);
_isCrossbowLoaded = true;
}
private void Update() private void Update()
{ {
if (_shootingTimer > 0)
{
_shootingTimer -= Time.deltaTime;
}
else if (!_isCrossbowLoaded)
{
ReloadArrow();
}
ScanForCollision(); ScanForCollision();
} }
private void ReloadArrow()
{
_instantiatedArrow.transform.SetParent(weapon.transform);
_instantiatedArrow.transform.position = _arrowSpawnPoint.position;
_instantiatedArrow.transform.rotation = _arrowSpawnPoint.rotation;
_instantiatedArrow.GetComponent<Rigidbody>().linearVelocity = Vector3.zero;
_isCrossbowLoaded = true;
}
private void ScanForCollision() private void ScanForCollision()
{ {
Collider[] hitColliders = int numColliders = Physics.OverlapSphereNonAlloc(transform.position, enemySettings.detectionRange, hitColliders,
Physics.OverlapSphere(transform.position, enemySettings.shootingRange, enemySettings.targetLayer); enemySettings.targetLayer);
foreach (var hitCollider in hitColliders) for (int i = 0; i < numColliders; i++)
{ {
Debug.Log("Collision detected with: " + hitCollider.name); if (_shootingTimer > 0)
{
RotateTowardsTarget(hitColliders[i]);
} }
else
{
RotateTowardsTargetAndShootArrow(hitColliders[i]);
}
}
}
private void RotateTowardsTarget(Collider hitCollider)
{
Vector3 direction = (hitCollider.transform.position - transform.position).normalized;
Quaternion lookRotation = Quaternion.LookRotation(new Vector3(direction.x, 0, direction.z));
transform.DORotateQuaternion(lookRotation, 0.7f);
}
private void RotateTowardsTargetAndShootArrow(Collider hitCollider)
{
Vector3 direction = (hitCollider.transform.position - transform.position).normalized;
Quaternion lookRotation = Quaternion.LookRotation(new Vector3(direction.x, 0, direction.z));
transform.DORotateQuaternion(lookRotation, 0.7f).OnComplete(() =>
{
_instantiatedArrow.transform.SetParent(null);
_instantiatedArrow.transform.rotation = weapon.transform.rotation;
_instantiatedArrow.GetComponent<Rigidbody>().linearVelocity =
direction * enemySettings.shootingRange;
_shootingTimer = enemySettings.shootingDelay;
_isCrossbowLoaded = false;
//TODO: add delay for enemy to not rotate before the weapon is shot.
});
} }
} }
\ No newline at end of file
...@@ -4,6 +4,7 @@ using UnityEngine; ...@@ -4,6 +4,7 @@ using UnityEngine;
public class EnemySettings : ScriptableObject public class EnemySettings : ScriptableObject
{ {
public LayerMask targetLayer; public LayerMask targetLayer;
public float detectionRange = 7f;
public float shootingRange = 10f; public float shootingRange = 10f;
public float shootingDelay = 1f; public float shootingDelay = 1f;
} }
\ No newline at end of file
using UnityEngine;
using UnityEngine.UIElements;
public class Arrow : MonoBehaviour
{
private BoxCollider _boxCollider;
// Start is called once before the first execution of Update after the MonoBehaviour is created
void Start()
{
_boxCollider = GetComponent<BoxCollider>();
}
// Update is called once per frame
void Update()
{
}
}
\ No newline at end of file
fileFormatVersion: 2 fileFormatVersion: 2
guid: e5a029138c30a7b41aacf6c38d1de068 guid: 5029c6c72ae05b4419cabf4c1e96e35f
\ No newline at end of file \ No newline at end of file
fileFormatVersion: 2
guid: c2a9e71ed86900d499393de44257cf04
...@@ -46,6 +46,39 @@ MonoBehaviour: ...@@ -46,6 +46,39 @@ MonoBehaviour:
m_Name: m_Name:
m_EditorClassIdentifier: m_EditorClassIdentifier:
enemySettings: {fileID: 11400000, guid: 5b554b15c5ebdf34b851d342d3f332c3, type: 2} enemySettings: {fileID: 11400000, guid: 5b554b15c5ebdf34b851d342d3f332c3, type: 2}
arrow: {fileID: 8885891558877188487, guid: c0cc14b5c48376d43b0421a2762d35cb, type: 3}
weapon: {fileID: 6430031212675530119}
--- !u!1 &1369079606729036068
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 3797023941742593236}
m_Layer: 0
m_Name: ArrowSpawnPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &3797023941742593236
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1369079606729036068}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0.005, y: 0.1774, z: 0.638}
m_LocalScale: {x: 1, y: 1, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 5942464512878880573}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &3920245832294658244 --- !u!1 &3920245832294658244
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -132,11 +165,11 @@ PrefabInstance: ...@@ -132,11 +165,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3} - target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
propertyPath: m_LocalRotation.w propertyPath: m_LocalRotation.w
value: 0.5 value: -0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3} - target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
propertyPath: m_LocalRotation.x propertyPath: m_LocalRotation.x
value: -0.5 value: 0.5
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3} - target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
propertyPath: m_LocalRotation.y propertyPath: m_LocalRotation.y
...@@ -152,11 +185,11 @@ PrefabInstance: ...@@ -152,11 +185,11 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3} - target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
propertyPath: m_LocalEulerAnglesHint.y propertyPath: m_LocalEulerAnglesHint.y
value: 90 value: 180
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3} - target: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
propertyPath: m_LocalEulerAnglesHint.z propertyPath: m_LocalEulerAnglesHint.z
value: 0 value: 90
objectReference: {fileID: 0} objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3} - target: {fileID: 919132149155446097, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
propertyPath: m_Name propertyPath: m_Name
...@@ -164,7 +197,10 @@ PrefabInstance: ...@@ -164,7 +197,10 @@ PrefabInstance:
objectReference: {fileID: 0} objectReference: {fileID: 0}
m_RemovedComponents: [] m_RemovedComponents: []
m_RemovedGameObjects: [] m_RemovedGameObjects: []
m_AddedGameObjects: [] m_AddedGameObjects:
- targetCorrespondingSourceObject: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
insertIndex: -1
addedObject: {fileID: 3797023941742593236}
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3} m_SourcePrefab: {fileID: 100100000, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
--- !u!4 &5942464512878880573 stripped --- !u!4 &5942464512878880573 stripped
...@@ -172,6 +208,11 @@ Transform: ...@@ -172,6 +208,11 @@ Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3} m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
m_PrefabInstance: {fileID: 6196221362579685590} m_PrefabInstance: {fileID: 6196221362579685590}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!1 &6430031212675530119 stripped
GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: c88a69f7965560c47b6ffa4eed82887f, type: 3}
m_PrefabInstance: {fileID: 6196221362579685590}
m_PrefabAsset: {fileID: 0}
--- !u!1001 &6595050288222494873 --- !u!1001 &6595050288222494873
PrefabInstance: PrefabInstance:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
...@@ -8,17 +8,46 @@ AnimatorStateMachine: ...@@ -8,17 +8,46 @@ AnimatorStateMachine:
m_PrefabInstance: {fileID: 0} m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_Name: Base Layer m_Name: Base Layer
m_ChildStates: [] m_ChildStates:
- serializedVersion: 1
m_State: {fileID: -3853274732491035516}
m_Position: {x: 40, y: 200, z: 0}
m_ChildStateMachines: [] m_ChildStateMachines: []
m_AnyStateTransitions: [] m_AnyStateTransitions: []
m_EntryTransitions: [] m_EntryTransitions: []
m_StateMachineTransitions: {} m_StateMachineTransitions: {}
m_StateMachineBehaviours: [] m_StateMachineBehaviours: []
m_AnyStatePosition: {x: 50, y: 20, z: 0} m_AnyStatePosition: {x: 50, y: 20, z: 0}
m_EntryPosition: {x: 50, y: 120, z: 0} m_EntryPosition: {x: 40, y: 120, z: 0}
m_ExitPosition: {x: 800, y: 120, z: 0} m_ExitPosition: {x: 800, y: 120, z: 0}
m_ParentStateMachinePosition: {x: 800, y: 20, z: 0} m_ParentStateMachinePosition: {x: 800, y: 20, z: 0}
m_DefaultState: {fileID: 0} m_DefaultState: {fileID: -3853274732491035516}
--- !u!1102 &-3853274732491035516
AnimatorState:
serializedVersion: 6
m_ObjectHideFlags: 1
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_Name: New State
m_Speed: 1
m_CycleOffset: 0
m_Transitions: []
m_StateMachineBehaviours: []
m_Position: {x: 50, y: 50, z: 0}
m_IKOnFeet: 0
m_WriteDefaultValues: 1
m_Mirror: 0
m_SpeedParameterActive: 0
m_MirrorParameterActive: 0
m_CycleOffsetParameterActive: 0
m_TimeParameterActive: 0
m_Motion: {fileID: -2767709846786070005, guid: 0592ff659cda68b41a8c48a2c5a11a87, type: 3}
m_Tag:
m_SpeedParameter:
m_MirrorParameter:
m_CycleOffsetParameter:
m_TimeParameter:
--- !u!91 &9100000 --- !u!91 &9100000
AnimatorController: AnimatorController:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
......
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8885891558877188487
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 4201272392407524179}
- component: {fileID: 1165258639717057592}
- component: {fileID: 3689328238253936162}
- component: {fileID: 8067914320767520699}
m_Layer: 0
m_Name: Arrow
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &4201272392407524179
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8885891558877188487}
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: 5813617724893457434}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!54 &1165258639717057592
Rigidbody:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8885891558877188487}
serializedVersion: 4
m_Mass: 1
m_Drag: 0
m_AngularDrag: 0.05
m_CenterOfMass: {x: 0, y: 0, z: 0}
m_InertiaTensor: {x: 1, y: 1, z: 1}
m_InertiaRotation: {x: 0, y: 0, z: 0, w: 1}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_ImplicitCom: 1
m_ImplicitTensor: 1
m_UseGravity: 0
m_IsKinematic: 0
m_Interpolate: 0
m_Constraints: 0
m_CollisionDetection: 0
--- !u!114 &3689328238253936162
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: 5029c6c72ae05b4419cabf4c1e96e35f, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!65 &8067914320767520699
BoxCollider:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8885891558877188487}
m_Material: {fileID: 0}
m_IncludeLayers:
serializedVersion: 2
m_Bits: 0
m_ExcludeLayers:
serializedVersion: 2
m_Bits: 0
m_LayerOverridePriority: 0
m_IsTrigger: 1
m_ProvidesContacts: 0
m_Enabled: 1
serializedVersion: 3
m_Size: {x: 0.1, y: 0.1, z: 0.8}
m_Center: {x: 0, y: 0, z: 0}
--- !u!1001 &6279328471144270833
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 4201272392407524179}
m_Modifications:
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalPosition.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalPosition.y
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalPosition.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalRotation.w
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalRotation.x
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalRotation.y
value: 0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalRotation.z
value: -0.7071068
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalEulerAnglesHint.x
value: 90
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalEulerAnglesHint.y
value: 180
objectReference: {fileID: 0}
- target: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
propertyPath: m_Name
value: Skeleton_Arrow
objectReference: {fileID: 0}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
--- !u!4 &5813617724893457434 stripped
Transform:
m_CorrespondingSourceObject: {fileID: -8679921383154817045, guid: 21cf7b4e19c915041ba13f4bc4ad2de0, type: 3}
m_PrefabInstance: {fileID: 6279328471144270833}
m_PrefabAsset: {fileID: 0}
fileFormatVersion: 2
guid: c0cc14b5c48376d43b0421a2762d35cb
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:
...@@ -90,10 +90,10 @@ PrefabInstance: ...@@ -90,10 +90,10 @@ PrefabInstance:
m_AddedComponents: m_AddedComponents:
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: cc7c757e7290f864da3c554181fd3c92, type: 3} - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: cc7c757e7290f864da3c554181fd3c92, type: 3}
insertIndex: -1 insertIndex: -1
addedObject: {fileID: 6966028400646605147} addedObject: {fileID: 2067167096600176798}
- targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: cc7c757e7290f864da3c554181fd3c92, type: 3} - targetCorrespondingSourceObject: {fileID: 919132149155446097, guid: cc7c757e7290f864da3c554181fd3c92, type: 3}
insertIndex: -1 insertIndex: -1
addedObject: {fileID: 2067167096600176798} addedObject: {fileID: 7036877414047071046}
m_SourcePrefab: {fileID: 100100000, guid: cc7c757e7290f864da3c554181fd3c92, type: 3} m_SourcePrefab: {fileID: 100100000, guid: cc7c757e7290f864da3c554181fd3c92, type: 3}
--- !u!4 &5151169727346497949 stripped --- !u!4 &5151169727346497949 stripped
Transform: Transform:
...@@ -105,18 +105,6 @@ GameObject: ...@@ -105,18 +105,6 @@ GameObject:
m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: cc7c757e7290f864da3c554181fd3c92, type: 3} m_CorrespondingSourceObject: {fileID: 919132149155446097, guid: cc7c757e7290f864da3c554181fd3c92, type: 3}
m_PrefabInstance: {fileID: 4680956274496945782} m_PrefabInstance: {fileID: 4680956274496945782}
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
--- !u!114 &6966028400646605147
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5491982788859757351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: e5a029138c30a7b41aacf6c38d1de068, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!64 &2067167096600176798 --- !u!64 &2067167096600176798
MeshCollider: MeshCollider:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -139,3 +127,15 @@ MeshCollider: ...@@ -139,3 +127,15 @@ MeshCollider:
m_Convex: 1 m_Convex: 1
m_CookingOptions: 30 m_CookingOptions: 30
m_Mesh: {fileID: -408259373467118210, guid: cc7c757e7290f864da3c554181fd3c92, type: 3} m_Mesh: {fileID: -408259373467118210, guid: cc7c757e7290f864da3c554181fd3c92, type: 3}
--- !u!114 &7036877414047071046
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 5491982788859757351}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: c2a9e71ed86900d499393de44257cf04, type: 3}
m_Name:
m_EditorClassIdentifier:
...@@ -119,6 +119,11 @@ NavMeshSettings: ...@@ -119,6 +119,11 @@ NavMeshSettings:
debug: debug:
m_Flags: 0 m_Flags: 0
m_NavMeshData: {fileID: 0} m_NavMeshData: {fileID: 0}
--- !u!4 &68437660 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
m_PrefabInstance: {fileID: 8947265383642028312}
m_PrefabAsset: {fileID: 0}
--- !u!1 &303522002 --- !u!1 &303522002
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -358,6 +363,63 @@ CanvasRenderer: ...@@ -358,6 +363,63 @@ CanvasRenderer:
m_PrefabAsset: {fileID: 0} m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 395323201} m_GameObject: {fileID: 395323201}
m_CullTransparentMesh: 1 m_CullTransparentMesh: 1
--- !u!1001 &467991568
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1301357994}
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}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
--- !u!1 &796216484 --- !u!1 &796216484
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -479,6 +541,11 @@ Transform: ...@@ -479,6 +541,11 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0} m_LocalEulerAnglesHint: {x: 50, y: -30, z: 0}
--- !u!4 &820395097 stripped
Transform:
m_CorrespondingSourceObject: {fileID: 462326326808441748, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
m_PrefabInstance: {fileID: 467991568}
m_PrefabAsset: {fileID: 0}
--- !u!1 &865924115 --- !u!1 &865924115
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -849,6 +916,39 @@ Transform: ...@@ -849,6 +916,39 @@ Transform:
m_Children: [] m_Children: []
m_Father: {fileID: 0} m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0} m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1301357993
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1301357994}
m_Layer: 0
m_Name: Enemies
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &1301357994
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1301357993}
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: 68437660}
- {fileID: 820395097}
m_Father: {fileID: 0}
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1504492729 --- !u!1 &1504492729
GameObject: GameObject:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1642,6 +1742,63 @@ PrefabInstance: ...@@ -1642,6 +1742,63 @@ PrefabInstance:
m_AddedGameObjects: [] m_AddedGameObjects: []
m_AddedComponents: [] m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: c3c6003d148e24045a5699c460b258c9, type: 3} m_SourcePrefab: {fileID: 100100000, guid: c3c6003d148e24045a5699c460b258c9, type: 3}
--- !u!1001 &8947265383642028312
PrefabInstance:
m_ObjectHideFlags: 0
serializedVersion: 2
m_Modification:
serializedVersion: 3
m_TransformParent: {fileID: 1301357994}
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}
m_RemovedComponents: []
m_RemovedGameObjects: []
m_AddedGameObjects: []
m_AddedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 347c9a55bcfa08347bc5fb513a0e9ad4, type: 3}
--- !u!1660057539 &9223372036854775807 --- !u!1660057539 &9223372036854775807
SceneRoots: SceneRoots:
m_ObjectHideFlags: 0 m_ObjectHideFlags: 0
...@@ -1654,3 +1811,4 @@ SceneRoots: ...@@ -1654,3 +1811,4 @@ SceneRoots:
- {fileID: 303522006} - {fileID: 303522006}
- {fileID: 865924118} - {fileID: 865924118}
- {fileID: 6950935288098905811} - {fileID: 6950935288098905811}
- {fileID: 1301357994}
...@@ -12,3 +12,9 @@ MonoBehaviour: ...@@ -12,3 +12,9 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 616231e36fe89cd42bd7aea67dfa0ace, type: 3} m_Script: {fileID: 11500000, guid: 616231e36fe89cd42bd7aea67dfa0ace, type: 3}
m_Name: RogueSettings m_Name: RogueSettings
m_EditorClassIdentifier: m_EditorClassIdentifier:
targetLayer:
serializedVersion: 2
m_Bits: 512
detectionRange: 7
shootingRange: 10
shootingDelay: 2
...@@ -14,7 +14,7 @@ TagManager: ...@@ -14,7 +14,7 @@ TagManager:
- Interactable - Interactable
- Destructable - Destructable
- Pickupable - Pickupable
- - Player
- -
- -
- -
......
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