idk
This commit is contained in:
Noah4ever
2021-11-12 08:23:51 +01:00
parent 6e13025624
commit dd4da20ec3
10 changed files with 1725 additions and 463 deletions

View File

@@ -266,7 +266,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 9064841067161443684}
m_Layer: 0
m_Layer: 7
m_Name: Right_Hand_REF
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -297,7 +297,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2781132594439880980}
m_Layer: 0
m_Layer: 7
m_Name: Left_Hand_REF
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -385,6 +385,94 @@ MonoBehaviour:
totalAmmunition: 64
bulletExit: {fileID: 5922641287523208729}
allowAction: 1
--- !u!1 &4179802636391483292
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 2655064791458186669}
- component: {fileID: 6237022232134764314}
- component: {fileID: 7196982599235120773}
m_Layer: 0
m_Name: WeaponCamera
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &2655064791458186669
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4179802636391483292}
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: 6272346181657429396}
m_RootOrder: 3
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!20 &6237022232134764314
Camera:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4179802636391483292}
m_Enabled: 1
serializedVersion: 2
m_ClearFlags: 3
m_BackGroundColor: {r: 1, g: 1, b: 1, a: 0}
m_projectionMatrixMode: 1
m_GateFitMode: 2
m_FOVAxisMode: 0
m_SensorSize: {x: 36, y: 24}
m_LensShift: {x: 0, y: 0}
m_FocalLength: 50
m_NormalizedViewPortRect:
serializedVersion: 2
x: 0
y: 0
width: 1
height: 1
near clip plane: 0.1
far clip plane: 1000
field of view: 61.4
orthographic: 0
orthographic size: 5
m_Depth: 1
m_CullingMask:
serializedVersion: 2
m_Bits: 128
m_RenderingPath: 1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
m_TargetEye: 3
m_HDR: 1
m_AllowMSAA: 1
m_AllowDynamicResolution: 0
m_ForceIntoRT: 0
m_OcclusionCulling: 1
m_StereoConvergence: 10
m_StereoSeparation: 0.022
--- !u!114 &7196982599235120773
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 4179802636391483292}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 48948dfe9d76b07488dacd46a7955fa1, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!1 &4824770690127859843
GameObject:
m_ObjectHideFlags: 0
@@ -566,7 +654,7 @@ GameObject:
serializedVersion: 6
m_Component:
- component: {fileID: 2695726321628216464}
m_Layer: 0
m_Layer: 7
m_Name: BulletExitPoint
m_TagString: Untagged
m_Icon: {fileID: 0}
@@ -613,6 +701,7 @@ GameObject:
- component: {fileID: 7198056240135858432}
- component: {fileID: 3208778597385635596}
- component: {fileID: 8473162599388710253}
- component: {fileID: 9002763652799938533}
m_Layer: 0
m_Name: Player Animation Test
m_TagString: Player
@@ -763,6 +852,7 @@ MonoBehaviour:
syncMode: 0
syncInterval: 0.1
playerCamera: {fileID: 6272346181657429396}
weaponCamera: {fileID: 0}
playerNeck: {fileID: 981273033772084037}
mouseSensitivity: 4
maxCameraAngle: 90
@@ -984,6 +1074,8 @@ MonoBehaviour:
shootAnim: {fileID: 4276885029697240453}
weaponHolder: {fileID: 3682030003239559187}
GunRotation: {fileID: 7768205653369755348}
mCamera: {fileID: 6272346181657429395}
limitAmmunition: 1
--- !u!114 &8473162599388710253
MonoBehaviour:
m_ObjectHideFlags: 0
@@ -996,6 +1088,24 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 323a821a5fef23a45aa5333ce1f55202, type: 3}
m_Name:
m_EditorClassIdentifier:
--- !u!114 &9002763652799938533
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6272346181302961293}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 98dadd30ba25ec34db3b45d0dca2827b, type: 3}
m_Name:
m_EditorClassIdentifier:
syncMode: 0
syncInterval: 0.1
currentWeaponIndex: 0
allWeapons: []
activeWeapons: []
cam: {fileID: 6272346181657429395}
--- !u!1 &6272346181657429393
GameObject:
m_ObjectHideFlags: 0
@@ -1029,6 +1139,7 @@ Transform:
- {fileID: 4074665071222326704}
- {fileID: 1979435770070801855}
- {fileID: 1468248131875751636}
- {fileID: 2655064791458186669}
m_Father: {fileID: 981273033772084037}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
@@ -1039,7 +1150,7 @@ Camera:
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 6272346181657429393}
m_Enabled: 1
m_Enabled: 0
serializedVersion: 2
m_ClearFlags: 1
m_BackGroundColor: {r: 0.19215687, g: 0.3019608, b: 0.4745098, a: 0}
@@ -1060,10 +1171,10 @@ Camera:
field of view: 61.4
orthographic: 0
orthographic size: 5
m_Depth: -1
m_Depth: 0
m_CullingMask:
serializedVersion: 2
m_Bits: 4294967295
m_Bits: 119
m_RenderingPath: -1
m_TargetTexture: {fileID: 0}
m_TargetDisplay: 0
@@ -1401,14 +1512,90 @@ PrefabInstance:
propertyPath: m_LocalEulerAnglesHint.z
value: 0
objectReference: {fileID: 0}
- target: {fileID: -8391933466715459243, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -8203754323188703182, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -7054223159285474668, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -5922622823359544968, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -2638991995655067945, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -2221209126115689913, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -1980471935049097083, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: -1604755613463741856, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Name
value: M92
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_TagString
value: Weapon
objectReference: {fileID: 0}
- target: {fileID: 1726362074032003892, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 1855436591146390978, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 3037560442690355669, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4069185504284304746, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4338342771885537534, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 4440277073990949090, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 5866666021909216657, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Controller
value:
objectReference: {fileID: 9100000, guid: daf332133edb41440a3abb1cf6e24558, type: 2}
- target: {fileID: 6952977719256411990, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 7036213049465896255, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
- target: {fileID: 7913327932472438409, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
propertyPath: m_Layer
value: 7
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: d1ac7df45c0d7e84993ff57afe3c4d6f, type: 3}
--- !u!1 &3682030003239559187 stripped
@@ -1479,67 +1666,67 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: -6617984589164989631, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.w
value: 0.49565774
value: 0.49762657
objectReference: {fileID: 0}
- target: {fileID: -6617984589164989631, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.x
value: 0.4028321
value: 0.386114
objectReference: {fileID: 0}
- target: {fileID: -6617984589164989631, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.y
value: 0.47084302
value: 0.48171118
objectReference: {fileID: 0}
- target: {fileID: -6617984589164989631, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.z
value: 0.6085693
value: 0.60929316
objectReference: {fileID: 0}
- target: {fileID: -5945183352512053224, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.w
value: 0.5662176
value: 0.6168926
objectReference: {fileID: 0}
- target: {fileID: -5945183352512053224, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.x
value: 0.8008484
value: 0.7642771
objectReference: {fileID: 0}
- target: {fileID: -5945183352512053224, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.y
value: 0.04959982
value: 0.05403893
objectReference: {fileID: 0}
- target: {fileID: -5945183352512053224, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.z
value: -0.18862498
value: -0.18001123
objectReference: {fileID: 0}
- target: {fileID: -5815427104119794202, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.w
value: 0.6432096
value: 0.6961628
objectReference: {fileID: 0}
- target: {fileID: -5815427104119794202, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.x
value: -0.7010284
value: -0.6589092
objectReference: {fileID: 0}
- target: {fileID: -5815427104119794202, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.y
value: 0.02918151
value: 0.012771033
objectReference: {fileID: 0}
- target: {fileID: -5815427104119794202, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.z
value: 0.30657643
value: 0.28466263
objectReference: {fileID: 0}
- target: {fileID: -4598867093515939143, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.w
value: 0.64756745
value: 0.70013154
objectReference: {fileID: 0}
- target: {fileID: -4598867093515939143, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.x
value: -0.6947033
value: -0.6528746
objectReference: {fileID: 0}
- target: {fileID: -4598867093515939143, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.y
value: -0.034390952
value: -0.017168753
objectReference: {fileID: 0}
- target: {fileID: -4598867093515939143, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.z
value: -0.3112249
value: -0.28857553
objectReference: {fileID: 0}
- target: {fileID: 919132149155446097, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_Name
@@ -1547,35 +1734,35 @@ PrefabInstance:
objectReference: {fileID: 0}
- target: {fileID: 1740614089614901821, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.w
value: 0.556481
value: 0.60796833
objectReference: {fileID: 0}
- target: {fileID: 1740614089614901821, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.x
value: 0.80733955
value: 0.77107567
objectReference: {fileID: 0}
- target: {fileID: 1740614089614901821, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.y
value: -0.048747048
value: -0.05325729
objectReference: {fileID: 0}
- target: {fileID: 1740614089614901821, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.z
value: 0.19014606
value: 0.18160518
objectReference: {fileID: 0}
- target: {fileID: 2965664082145358743, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.w
value: 0.4882959
value: 0.4907071
objectReference: {fileID: 0}
- target: {fileID: 2965664082145358743, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.x
value: 0.41018188
value: 0.39377818
objectReference: {fileID: 0}
- target: {fileID: 2965664082145358743, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.y
value: -0.4844513
value: -0.49410793
objectReference: {fileID: 0}
- target: {fileID: 2965664082145358743, guid: 01316cb596562384da845bc519fb90de, type: 3}
propertyPath: m_LocalRotation.z
value: -0.59885305
value: -0.6000022
objectReference: {fileID: 0}
m_RemovedComponents: []
m_SourcePrefab: {fileID: 100100000, guid: 01316cb596562384da845bc519fb90de, type: 3}

File diff suppressed because it is too large Load Diff

View File

@@ -8,6 +8,7 @@ using Mirror;
public class DebugCanvas : MonoBehaviour
{
public TextMeshProUGUI DebugTextGrounded;
public TextMeshProUGUI DebugTextAmmunition;
public TextMeshProUGUI DebugTextClientServer;
public GameObject Player;
public GameObject GameManager;
@@ -17,6 +18,7 @@ public class DebugCanvas : MonoBehaviour
private void Start()
{
GameManager = GameObject.Find("GameManager");
}
private void Update()
{
@@ -36,10 +38,12 @@ public class DebugCanvas : MonoBehaviour
{
DebugTextGrounded.text = "isGrounded: " + Player.GetComponent<PlayerController>().isGrounded.ToString();
DebugTextAmmunition.text = Player.GetComponent<Shoot>().CurAmmo.ToString() + " / " + Player.GetComponent<Shoot>().TotalAmmo.ToString();
deltaTime += (Time.deltaTime - deltaTime) * 0.1f;
float fps = 1.0f / deltaTime;
fpsText.text = Mathf.Ceil(fps).ToString() + "FPS";
}
}
}

View File

@@ -7,6 +7,7 @@ public class PlayerMouseLook : NetworkBehaviour
{
[Header("Mouse Look")]
[SerializeField] private Transform playerCamera = null;
[SerializeField] private Transform weaponCamera = null;
[SerializeField] private Transform playerNeck = null;
[SerializeField] private float mouseSensitivity = 4.0f;
@@ -35,7 +36,7 @@ public class PlayerMouseLook : NetworkBehaviour
{
controller = GetComponent<CharacterController>();
playerCamera.gameObject.SetActive(true);
playerCamera.gameObject.GetComponent<Camera>().enabled = true;
neckLength = Vector3.Distance(playerNeck.position,playerCamera.position);
if (lockCursor)

View File

@@ -2,108 +2,141 @@ using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;
using TMPro;
public class Shoot : NetworkBehaviour
{
[SerializeField] GameObject muzzle;
[SerializeField] ShootAnimation shootAnim;
[SerializeField] GameObject weaponHolder;
[SerializeField] GameObject GunRotation;
[SerializeField] Camera mCamera;
[SerializeField] bool limitAmmunition = true;
Ammunition ammunition;
private Weapon weapon;
private RaycastHit crosshairHitPoint;
private Camera mCamera;
private Vector3 _pointDirection;
private Quaternion _lookRotation;
private Vector3 hitpos;
private RaycastHit hit;
private Ray ray;
private void Start()
{
if (isLocalPlayer)
{
mCamera = Camera.main;
private bool updateCanvas = true;
private int curAmmo = 1, totalAmmo = 1;
public int CurAmmo { get => curAmmo; set => curAmmo = value; }
public int TotalAmmo { get => totalAmmo; set => totalAmmo = value; }
private void Start() {
if (isLocalPlayer) {
weapon = weaponHolder.GetComponent<Weapon>();
shootAnim.OnSwitchWeapon(weapon.Firerate);
curAmmo = weapon.CurrentAmmunition;
totalAmmo = weapon.TotalAmmunition;
}
}
private void Update()
{
Debug.Log("Test");
if (isLocalPlayer)
{
if (Input.GetButtonDown("Fire"))
{
private void Update() {
if (isLocalPlayer) {
if (updateCanvas) {
curAmmo = weapon.CurrentAmmunition;
totalAmmo = weapon.TotalAmmunition;
updateCanvas = false;
}
if (Input.GetButtonDown("Fire")) {
updateCanvas = true;
CmdFireBullet();
}
if (Input.GetButtonDown("Reload"))
{
if (Input.GetButtonDown("Reload")) {
updateCanvas = true;
CmdReloadWeapon();
}
}
}
[Command]
private void CmdReloadWeapon()
{
if (GetComponent<Ammunition>() != null && weapon.AllowAction)
{
GetComponent<Ammunition>().reloadWeapon(weapon);
private void CmdReloadWeapon() {
if (weapon.AllowAction && limitAmmunition) {
reloadWeapon(weapon);
}
}
[Command]
// This code will be executed on the Server.
private void CmdFireBullet()
{
ray = new Ray(mCamera.transform.position, mCamera.transform.forward);
if(Physics.Raycast(ray, out crosshairHitPoint, 5000f)){
hitpos = crosshairHitPoint.point;
}
else
{
hitpos = mCamera.transform.position + mCamera.transform.forward * 5000;
private void CmdFireBullet() {
ray = new Ray(mCamera.transform.position, mCamera.transform.forward); // Raycast from Camera
if(Physics.Raycast(ray, out crosshairHitPoint, 5000f)) { // Check if Raycast is beyond 5000
hitpos = crosshairHitPoint.point; // If hitpoint is under 5000
} else {
hitpos = mCamera.transform.position + mCamera.transform.forward * 5000;
}
_pointDirection = hitpos - muzzle.transform.position;
_lookRotation = Quaternion.LookRotation(_pointDirection);
GunRotation.transform.rotation = Quaternion.RotateTowards(GunRotation.transform.rotation, _lookRotation, 1f);
GunRotation.transform.rotation = Quaternion.RotateTowards(GunRotation.transform.rotation, _lookRotation, 1f); // Point weapon to raycast hitpoint from camera
if (weapon.AllowAction)
{
if (Physics.Raycast(muzzle.transform.position, muzzle.transform.forward, out hit) && weapon.CurrentAmmunition > 0)
{
shootAnimation();
if (weapon.AllowAction) { // If not reloading etc.
if (Physics.Raycast(muzzle.transform.position, muzzle.transform.forward, out hit) && weapon.CurrentAmmunition > 0) { // Raycast from Bullet Exit Point to camera raycast
shootAnimation(); // Start Shoot Animation
Debug.DrawLine(muzzle.transform.position, hit.point);
Debug.Log(hit.transform.name);
if (hit.transform.gameObject.GetComponent<Player>() != null)
{
Debug.Log("GETROFFEN------------------");
hit.transform.gameObject.GetComponent<Player>().RemoveHealth(20);
bulletHole(GameObject.CreatePrimitive(PrimitiveType.Sphere), hit); // Creates bullethole where raycast hits
if (hit.transform.gameObject.GetComponent<Player>() != null) { // If hit object is a player
Debug.Log("-->HIT PLAYER: " + hit.transform.name);
hit.transform.gameObject.GetComponent<Player>().RemoveHealth(weapon.Damage);
}
}
if (GetComponent<Ammunition>() != null)
{
GetComponent<Ammunition>().subtractAmmunition(weapon);
if (limitAmmunition) {
subtractAmmunition(weapon); // Subtract Ammunition
}
StartCoroutine(fireRate());
}
}
}
[Client]
void shootAnimation()
void bulletHole(GameObject holeObject, RaycastHit hit)
{
holeObject.transform.localScale = new Vector3(0.2f, 0.2f, 0.2f);
holeObject.transform.position = hit.point;
}
[Client]
void shootAnimation() {
shootAnim.recoil(0.1f);
}
IEnumerator fireRate()
{
IEnumerator fireRate() {
weapon.AllowAction = false;
yield return new WaitForSeconds(60f/weapon.Firerate);
yield return new WaitForSeconds(60f/weapon.Firerate); // Waits for firerate seconds
weapon.AllowAction = true;
}
private bool subtractAmmunition(Weapon weapon) { // Subtracts Ammunition from weapon
if (weapon.CurrentAmmunition > 0) {
weapon.CurrentAmmunition -= 1;
return true;
}
return false;
}
private bool reloadWeapon(Weapon weapon) { // Reloads Ammunition from weapon
if (weapon.AllowAction && weapon.TotalAmmunition > 0) {
weapon.AllowAction = false;
int dif = weapon.MagazinSize - weapon.CurrentAmmunition;
if (weapon.TotalAmmunition >= dif) {
weapon.CurrentAmmunition += dif;
weapon.TotalAmmunition -= dif;
}
else {
weapon.CurrentAmmunition += weapon.TotalAmmunition;
weapon.TotalAmmunition = 0;
}
weapon.AllowAction = true;
Debug.Log("Reloaded");
return true;
}
return false;
}
}

View File

@@ -10,7 +10,7 @@ public class Weapon : MonoBehaviour
}
[SerializeField] weaponKinds weaponKind;
[SerializeField] bool active = false;
[SerializeField] float damage = 0;
[SerializeField] int damage = 0;
[SerializeField] float firerate = 0;
[SerializeField] int roundsPerShot = 1;
[SerializeField] float recoilStrength = 0;
@@ -22,7 +22,7 @@ public class Weapon : MonoBehaviour
public bool Active { get => active; set => active = value; }
public weaponKinds WeaponKind { get => weaponKind; set => weaponKind = value; }
public float Damage { get => damage; set => damage = value; }
public int Damage { get => damage; set => damage = value; }
public float Firerate { get => firerate; set => firerate = value; }
public int RoundsPerShot { get => roundsPerShot; set => roundsPerShot = value; }
public float RecoilStrength { get => recoilStrength; set => recoilStrength = value; }

View File

@@ -1,57 +1,64 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Mirror;
public class WeaponManager : MonoBehaviour
public class WeaponManager : NetworkBehaviour
{
public int currentWeaponIndex = 0;
public List<GameObject> allWeapons = new List<GameObject>();
public GameObject[] activeWeapons;
[SerializeField] GameObject cam;
[SerializeField] Camera cam;
private void Awake()
{
activeWeapons = new GameObject[4];
}
void Update() {
if(Input.GetAxis("Mouse ScrollWheel") > 0f){ // Scroll up
if (currentWeaponIndex <= 0)
{ currentWeaponIndex = activeWeapons.Length; }
else { currentWeaponIndex--; }
}
if (Input.GetAxis("Mouse ScrollWheel") < 0f){ // Scroll down
if (currentWeaponIndex >= activeWeapons.Length)
{ currentWeaponIndex = 0; }
else { currentWeaponIndex++; }
}
if (Input.GetButton("Interact")) // e
{
if (Physics.Raycast(cam.transform.position, cam.transform.forward, out RaycastHit hit))
{
Debug.DrawLine(cam.transform.position, hit.point);
if (allWeapons.Contains(hit.transform.gameObject) && !searchInArray(activeWeapons, hit.transform.gameObject)) // If Object is a weapon and the weapon is not in the current active weapons
{
switch (hit.transform.GetComponent<Weapon>().WeaponKind.ToString()) // Adding weapon to inventory slot
{
case "Rifle": activeWeapons[0] = hit.transform.gameObject; break;
case "Pistole": activeWeapons[1] = hit.transform.gameObject; break;
case "Knife": activeWeapons[2] = hit.transform.gameObject; break;
case "Granade": activeWeapons[3] = hit.transform.gameObject; break;
default: break;
}
}
void Update() {
if (isLocalPlayer) {
if(Input.GetAxis("Mouse ScrollWheel") > 0f){ // Scroll up
if (currentWeaponIndex <= 0)
{ currentWeaponIndex = activeWeapons.Length; }
else { currentWeaponIndex--; }
}else if (Input.GetAxis("Mouse ScrollWheel") < 0f){ // Scroll down
if (currentWeaponIndex >= activeWeapons.Length)
{ currentWeaponIndex = 0; }
else { currentWeaponIndex++; }
}
if (Input.GetButton("Interact")) // e
{
CmdPickupWeapon();
}else if (Input.GetButton("Drop")) // q Droping weapon
{
activeWeapons[currentWeaponIndex] = null;
}
}
if (Input.GetButton("Drop")) // q Droping weapon
{
activeWeapons[currentWeaponIndex] = null;
}
}
[Command]
private void CmdPickupWeapon() {
if (Physics.Raycast(cam.transform.position, cam.transform.forward, out RaycastHit hit))
{
Debug.DrawLine(cam.transform.position, hit.point);
if (hit.transform.tag == "Weapon") // If Object is a weapon and the weapon is not in the current active weapons
{
switch (hit.transform.GetComponent<Weapon>().WeaponKind.ToString()) // Adding weapon to inventory slot
{
case "Rifle": activeWeapons[0] = hit.transform.gameObject; break;
case "Pistole": activeWeapons[1] = hit.transform.gameObject; break;
case "Knife": activeWeapons[2] = hit.transform.gameObject; break;
case "Granade": activeWeapons[3] = hit.transform.gameObject; break;
default: break;
}
}
}
}
private bool searchInArray(GameObject[] arr, GameObject searchObj)
{

View File

@@ -3,7 +3,8 @@
--- !u!78 &1
TagManager:
serializedVersion: 2
tags: []
tags:
- Weapon
layers:
- Default
- TransparentFX

View File

@@ -8,13 +8,12 @@ MonoBehaviour:
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_EditorHideFlags: 0
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 3}
- {fileID: 14}
m_Position:
serializedVersion: 2
x: 0
@@ -23,8 +22,8 @@ MonoBehaviour:
height: 731
m_MinSize: {x: 400, y: 200}
m_MaxSize: {x: 32384, y: 16192}
vertical: 0
controlID: -1
vertical: 1
controlID: 10675
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -45,9 +44,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 713.60004
x: 656.8
y: 73.6
width: 455.59998
width: 511.60004
height: 450.2
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@@ -59,11 +58,11 @@ MonoBehaviour:
m_ShowGizmos: 0
m_TargetDisplay: 0
m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
m_TargetSize: {x: 455.59998, y: 429.2}
m_TargetSize: {x: 511.60004, y: 429.2}
m_TextureFilterMode: 0
m_TextureHideFlags: 61
m_RenderIMGUI: 1
m_EnterPlayModeBehavior: 0
m_EnterPlayModeBehavior: 1
m_UseMipMap: 0
m_VSyncEnabled: 0
m_Gizmos: 0
@@ -74,8 +73,8 @@ MonoBehaviour:
m_VRangeLocked: 0
hZoomLockedByDefault: 0
vZoomLockedByDefault: 0
m_HBaseRangeMin: -182.23999
m_HBaseRangeMax: 182.23999
m_HBaseRangeMin: -204.64001
m_HBaseRangeMax: 204.64001
m_VBaseRangeMin: -171.68001
m_VBaseRangeMax: 171.68001
m_HAllowExceedBaseRangeMin: 1
@@ -86,7 +85,7 @@ MonoBehaviour:
m_HSlider: 0
m_VSlider: 0
m_IgnoreScrollWheelUntilClicked: 0
m_EnableMouseInput: 0
m_EnableMouseInput: 1
m_EnableSliderZoomHorizontal: 0
m_EnableSliderZoomVertical: 0
m_UniformScale: 1
@@ -95,23 +94,23 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 455.59998
width: 511.60004
height: 429.2
m_Scale: {x: 1.1592739, y: 1.1592739}
m_Translation: {x: 227.79999, y: 214.6}
m_Scale: {x: 1.1592733, y: 1.1592739}
m_Translation: {x: 255.80002, y: 214.6}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -196.5023
x: -220.6555
y: -185.11589
width: 393.0046
width: 441.311
height: 370.23178
m_MinimalGUI: 1
m_defaultScale: 1
m_LastWindowPixelSize: {x: 569.5, y: 562.75}
m_LastWindowPixelSize: {x: 639.50006, y: 562.75}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000
@@ -131,17 +130,17 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Children:
- {fileID: 4}
- {fileID: 11}
- {fileID: 15}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1171.2
width: 1536
height: 731
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 1
controlID: -1
m_MinSize: {x: 400, y: 200}
m_MaxSize: {x: 32384, y: 16192}
vertical: 0
controlID: 10676
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -156,19 +155,44 @@ MonoBehaviour:
m_EditorClassIdentifier:
m_Children:
- {fileID: 5}
- {fileID: 7}
- {fileID: 10}
- {fileID: 12}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1171.2
width: 1170.4
height: 731
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 1
controlID: 10677
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12010, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 6}
- {fileID: 8}
- {fileID: 11}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1170.4
height: 471.2
m_MinSize: {x: 300, y: 100}
m_MaxSize: {x: 24288, y: 8096}
vertical: 0
controlID: -1
--- !u!114 &5
controlID: 10678
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -185,16 +209,16 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 297.6
width: 275.2
height: 471.2
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_ActualView: {fileID: 6}
m_ActualView: {fileID: 7}
m_Panes:
- {fileID: 6}
- {fileID: 7}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &6
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -216,7 +240,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 73.6
width: 296.6
width: 274.2
height: 450.2
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@@ -227,7 +251,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 4e34fdfff434fdff5255fdffe496fdffb2b0fdff62d4fdff08d5fdffc6f5fdff6cf6fdff6251feff0852feff4658feff4859feffe695feff849ffeff34a0feff02cbfeff740affffa018ffff5019ffffdc1efffffe55ffff0456ffff1456ffff2056ffff2656ffff5656ffff0657ffff9265ffff9865ffffa865ffffb465ffffba65ffffea65ffff9a66ffff7e88ffff8488ffffb488ffff6489ffffa48dffff548effff3af4ffff40f4ffff50f4ffff5cf4ffff62f4ffff90f4ffff40f5ffffa6f7fffff4ffffff
m_ExpandedIDs: c2faffff2afbffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -243,7 +267,7 @@ MonoBehaviour:
m_IsRenaming: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 0
m_ClientGUIView: {fileID: 5}
m_ClientGUIView: {fileID: 6}
m_SearchString:
m_ExpandedScenes: []
m_CurrenRootInstanceID: 0
@@ -251,7 +275,7 @@ MonoBehaviour:
m_IsLocked: 0
m_CurrentSortingName: TransformSorting
m_WindowGUID: 4c969a2b90040154d917609493e03593
--- !u!114 &7
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -266,82 +290,18 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 297.6
x: 275.2
y: 0
width: 415.99997
width: 381.59998
height: 471.2
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 9}
m_Panes:
- {fileID: 8}
- {fileID: 9}
m_Selected: 1
m_LastSelected: 1
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
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: 12914, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Animator
m_Image: {fileID: 1711060831702674872, guid: 0000000000000000d000000000000000, type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 298.6
y: 19
width: 871.6
height: 450.2
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
m_ViewTransforms:
m_KeySerializationHelper:
- {fileID: 7614406280852874800, guid: daf332133edb41440a3abb1cf6e24558, type: 2}
m_ValueSerializationHelper:
- e00: 1.0177464
e01: 0
e02: 0
e03: -77.03352
e10: 0
e11: 1.0177464
e12: 0
e13: 111.43313
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_PreviewAnimator: {fileID: 0}
m_AnimatorController: {fileID: 9100000, guid: daf332133edb41440a3abb1cf6e24558, type: 2}
m_BreadCrumbs:
- m_Target: {fileID: 7614406280852874800, guid: daf332133edb41440a3abb1cf6e24558, type: 2}
m_ScrollPosition: {x: 0, y: 0}
stateMachineGraph: {fileID: 0}
stateMachineGraphGUI: {fileID: 0}
blendTreeGraph: {fileID: 0}
blendTreeGraphGUI: {fileID: 0}
m_AutoLiveLink: 1
m_MiniTool: 0
m_LockTracker:
m_IsLocked: 0
m_CurrentEditor: 1
m_LayerEditor:
m_SelectedLayerIndex: 0
- {fileID: 10}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -362,9 +322,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 297.6
x: 275.2
y: 73.6
width: 413.99997
width: 379.59998
height: 450.2
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@@ -375,7 +335,7 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 1
snapOffset: {x: -98.400024, y: -26}
snapOffset: {x: -98.399994, y: -26}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 3
id: Tool Settings
@@ -386,9 +346,9 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 1
snapOffset: {x: -141, y: 149}
snapOffset: {x: 0, y: -30.199982}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 1
snapCorner: 2
id: unity-grid-and-snap-toolbar
index: 1
layout: 1
@@ -430,9 +390,9 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 1
snapOffset: {x: 67.5, y: 86}
snapOffset: {x: -128, y: -123.20001}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 0
snapCorner: 3
id: Orientation
index: 0
layout: 4
@@ -571,16 +531,16 @@ MonoBehaviour:
m_WindowGUID: cc27987af1a868c49b0894db9c0f5429
m_Gizmos: 0
m_OverrideSceneCullingMask: 6917529027641081856
m_SceneIsLit: 0
m_SceneIsLit: 1
m_SceneLighting: 1
m_2DMode: 0
m_2DMode: 1
m_isRotationLocked: 0
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: -0.56465197, y: 2.0329852, z: -0.022925854}
m_Target: {x: 233.63658, y: 216.03629, z: -2.2254918}
speed: 2
m_Value: {x: -0.56465197, y: 2.0329852, z: -0.022925854}
m_Value: {x: 233.63658, y: 216.03629, z: -2.2254918}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@@ -609,17 +569,17 @@ MonoBehaviour:
m_Size: {x: 1, y: 1}
yGrid:
m_Fade:
m_Target: 1
m_Target: 0
speed: 2
m_Value: 1
m_Value: 0
m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4}
m_Pivot: {x: 0, y: 0, z: 0}
m_Size: {x: 1, y: 1}
zGrid:
m_Fade:
m_Target: 0
m_Target: 1
speed: 2
m_Value: 0
m_Value: 1
m_Color: {r: 0.5, g: 0.5, b: 0.5, a: 0.4}
m_Pivot: {x: 0, y: 0, z: 0}
m_Size: {x: 1, y: 1}
@@ -627,20 +587,20 @@ MonoBehaviour:
m_GridAxis: 1
m_gridOpacity: 0.5
m_Rotation:
m_Target: {x: 0.035058174, y: 0.9545344, z: -0.124399066, w: 0.2688129}
m_Target: {x: 0, y: 0, z: 0, w: 1}
speed: 2
m_Value: {x: 0.035056416, y: 0.9544865, z: -0.12439282, w: 0.2687994}
m_Value: {x: 0, y: 0, z: 0, w: 1}
m_Size:
m_Target: 1.0003884
m_Target: 338.06198
speed: 2
m_Value: 1.0003884
m_Value: 338.06198
m_Ortho:
m_Target: 1
speed: 2
m_Value: 1
m_CameraSettings:
m_Speed: 1
m_SpeedNormalized: 0.5
m_Speed: 0.34082997
m_SpeedNormalized: 0.16999999
m_SpeedMin: 0.001
m_SpeedMax: 2
m_EasingEnabled: 1
@@ -659,6 +619,70 @@ MonoBehaviour:
m_LastLockedObject: {fileID: 0}
m_ViewIsLockedToObject: 0
--- !u!114 &10
MonoBehaviour:
m_ObjectHideFlags: 52
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: 12914, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_TitleContent:
m_Text: Animator
m_Image: {fileID: 1711060831702674872, guid: 0000000000000000d000000000000000, type: 0}
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 298.6
y: 19
width: 578
height: 450.2
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
m_ViewTransforms:
m_KeySerializationHelper:
- {fileID: 7614406280852874800, guid: daf332133edb41440a3abb1cf6e24558, type: 2}
m_ValueSerializationHelper:
- e00: 0.93576187
e01: 0
e02: 0
e03: -83.14328
e10: 0
e11: 0.93576187
e12: 0
e13: 81.3544
e20: 0
e21: 0
e22: 1
e23: 0
e30: 0
e31: 0
e32: 0
e33: 1
m_PreviewAnimator: {fileID: 0}
m_AnimatorController: {fileID: 9100000, guid: daf332133edb41440a3abb1cf6e24558, type: 2}
m_BreadCrumbs:
- m_Target: {fileID: 7614406280852874800, guid: daf332133edb41440a3abb1cf6e24558, type: 2}
m_ScrollPosition: {x: 0, y: 0}
stateMachineGraph: {fileID: 0}
stateMachineGraphGUI: {fileID: 0}
blendTreeGraph: {fileID: 0}
blendTreeGraphGUI: {fileID: 0}
m_AutoLiveLink: 1
m_MiniTool: 0
m_LockTracker:
m_IsLocked: 0
m_CurrentEditor: 0
m_LayerEditor:
m_SelectedLayerIndex: 0
--- !u!114 &11
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -673,18 +697,18 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 713.6
x: 656.8
y: 0
width: 457.59998
width: 513.60004
height: 471.2
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_ActualView: {fileID: 2}
m_Panes:
- {fileID: 2}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &11
--- !u!114 &12
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -694,24 +718,24 @@ MonoBehaviour:
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12006, guid: 0000000000000000e000000000000000, type: 0}
m_Name: ProjectBrowser
m_Name: ConsoleWindow
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 471.2
width: 1171.2
width: 1170.4
height: 259.8
m_MinSize: {x: 231, y: 271}
m_MaxSize: {x: 10001, y: 10021}
m_ActualView: {fileID: 12}
m_MinSize: {x: 100, y: 100}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 14}
m_Panes:
- {fileID: 12}
- {fileID: 13}
m_Selected: 0
m_LastSelected: 1
--- !u!114 &12
- {fileID: 14}
m_Selected: 1
m_LastSelected: 0
--- !u!114 &13
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -733,7 +757,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 544.8
width: 1170.2
width: 1169.4
height: 238.79999
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@@ -741,7 +765,8 @@ MonoBehaviour:
m_SaveData: []
m_SearchFilter:
m_NameFilter:
m_ClassNames: []
m_ClassNames:
- Prefab
m_AssetLabels: []
m_AssetBundleNames: []
m_VersionControlStates: []
@@ -751,23 +776,22 @@ MonoBehaviour:
m_ShowAllHits: 0
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Prefabs/Player
m_Folders: []
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 64
m_LastFolders:
- Assets/Prefabs/Player
- Assets
m_LastFoldersGridSize: -1
m_LastProjectPath: C:\Users\juliu\Desktop\Ausbildung\Fps-build\3d-shooter
m_LastProjectPath: D:\.Downloads\Programming\Unity\Projects\Rheinmetall\3dshooter\3d-shooter
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 165.20001}
m_SelectedIDs: 2a690000
m_LastClickedID: 26922
m_ExpandedIDs: 00000000c4640000c6640000c8640000de64000000ca9a3bffffff7f
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 04ca9a3b
m_LastClickedID: 1000000004
m_ExpandedIDs: 00000000ea630000ec630000ee630000f06300007265000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -783,7 +807,7 @@ MonoBehaviour:
m_IsRenaming: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 11}
m_ClientGUIView: {fileID: 12}
m_SearchString:
m_CreateAssetUtility:
m_EndAction: {fileID: 0}
@@ -795,7 +819,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 00000000c4640000c6640000c864000000ca9a3bffffff7f
m_ExpandedIDs: 00000000ea630000ec630000ee630000f06300007265000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -839,7 +863,7 @@ MonoBehaviour:
m_IsRenaming: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 11}
m_ClientGUIView: {fileID: 12}
m_CreateAssetUtility:
m_EndAction: {fileID: 0}
m_InstanceID: 0
@@ -851,7 +875,7 @@ MonoBehaviour:
m_GridSize: 64
m_SkipHiddenPackages: 0
m_DirectoriesAreaWidth: 207
--- !u!114 &13
--- !u!114 &14
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -873,13 +897,13 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 544.8
width: 1170.2
width: 1169.4
height: 238.79999
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
--- !u!114 &14
--- !u!114 &15
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -894,18 +918,18 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1171.2
x: 1170.4
y: 0
width: 364.80005
width: 365.59998
height: 731
m_MinSize: {x: 275, y: 50}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 15}
m_ActualView: {fileID: 16}
m_Panes:
- {fileID: 15}
- {fileID: 16}
m_Selected: 0
m_LastSelected: 0
--- !u!114 &15
--- !u!114 &16
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -925,9 +949,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1171.2001
x: 1170.4
y: 73.6
width: 363.80005
width: 364.59998
height: 710
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@@ -936,7 +960,7 @@ MonoBehaviour:
m_ObjectsLockedBeforeSerialization: []
m_InstanceIDsLockedBeforeSerialization:
m_PreviewResizer:
m_CachedPref: 160
m_CachedPref: 151
m_ControlHash: -371814159
m_PrefName: Preview_InspectorPreview
m_LastInspectedObjectInstanceID: -1

View File

@@ -19,12 +19,83 @@ MonoBehaviour:
width: 1536
height: 780.8
m_ShowMode: 4
m_Title: Hierarchy
m_RootView: {fileID: 3}
m_Title: Game
m_RootView: {fileID: 2}
m_MinSize: {x: 875, y: 350}
m_MaxSize: {x: 10000, y: 10000}
m_Maximized: 1
--- !u!114 &2
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 3}
- {fileID: 5}
- {fileID: 4}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1536
height: 780.8
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
m_UseTopView: 1
m_TopViewHeight: 30
m_UseBottomView: 1
m_BottomViewHeight: 20
--- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1536
height: 30
m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0}
m_LastLoadedLayoutName:
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 760.8
width: 1536
height: 20
m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0}
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
@@ -47,78 +118,7 @@ MonoBehaviour:
m_MinSize: {x: 400, y: 200}
m_MaxSize: {x: 32384, y: 16192}
vertical: 1
controlID: 76
--- !u!114 &3
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12008, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children:
- {fileID: 4}
- {fileID: 2}
- {fileID: 5}
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1536
height: 780.8
m_MinSize: {x: 875, y: 300}
m_MaxSize: {x: 10000, y: 10000}
m_UseTopView: 1
m_TopViewHeight: 30
m_UseBottomView: 1
m_BottomViewHeight: 20
--- !u!114 &4
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12011, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 0
width: 1536
height: 30
m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0}
m_LastLoadedLayoutName:
--- !u!114 &5
MonoBehaviour:
m_ObjectHideFlags: 52
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 0}
m_Enabled: 1
m_EditorHideFlags: 1
m_Script: {fileID: 12042, guid: 0000000000000000e000000000000000, type: 0}
m_Name:
m_EditorClassIdentifier:
m_Children: []
m_Position:
serializedVersion: 2
x: 0
y: 760.8
width: 1536
height: 20
m_MinSize: {x: 0, y: 0}
m_MaxSize: {x: 0, y: 0}
controlID: 11199
--- !u!114 &6
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -143,7 +143,7 @@ MonoBehaviour:
m_MinSize: {x: 400, y: 200}
m_MaxSize: {x: 32384, y: 16192}
vertical: 0
controlID: 77
controlID: 11200
--- !u!114 &7
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -163,12 +163,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1169.6
width: 1218.4
height: 730.8
m_MinSize: {x: 300, y: 200}
m_MaxSize: {x: 24288, y: 16192}
vertical: 1
controlID: 78
controlID: 11252
--- !u!114 &8
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -189,12 +189,12 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 1169.6
width: 1218.4
height: 470.4
m_MinSize: {x: 300, y: 100}
m_MaxSize: {x: 24288, y: 8096}
vertical: 0
controlID: 79
controlID: 11253
--- !u!114 &9
MonoBehaviour:
m_ObjectHideFlags: 52
@@ -212,10 +212,10 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 0
width: 289.6
width: 296
height: 470.4
m_MinSize: {x: 201, y: 221}
m_MaxSize: {x: 4001, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 15}
m_Panes:
- {fileID: 15}
@@ -236,9 +236,9 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 289.6
x: 296
y: 0
width: 226.4
width: 388.8
height: 470.4
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
@@ -263,12 +263,12 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 516
x: 684.8
y: 0
width: 653.6
width: 533.60004
height: 470.4
m_MinSize: {x: 202, y: 221}
m_MaxSize: {x: 4002, y: 4021}
m_MinSize: {x: 200, y: 200}
m_MaxSize: {x: 4000, y: 4000}
m_ActualView: {fileID: 14}
m_Panes:
- {fileID: 14}
@@ -291,7 +291,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 470.4
width: 1169.6
width: 1218.4
height: 260.4
m_MinSize: {x: 101, y: 121}
m_MaxSize: {x: 4001, y: 4021}
@@ -316,9 +316,9 @@ MonoBehaviour:
m_Children: []
m_Position:
serializedVersion: 2
x: 1169.6
x: 1218.4
y: 0
width: 366.40002
width: 317.59998
height: 730.8
m_MinSize: {x: 276, y: 71}
m_MaxSize: {x: 4001, y: 4021}
@@ -347,9 +347,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 516
x: 684.8
y: 73.6
width: 651.6
width: 531.60004
height: 449.4
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@@ -361,7 +361,7 @@ MonoBehaviour:
m_ShowGizmos: 0
m_TargetDisplay: 0
m_ClearColor: {r: 0, g: 0, b: 0, a: 0}
m_TargetSize: {x: 651.6, y: 428.4}
m_TargetSize: {x: 531.60004, y: 428.4}
m_TextureFilterMode: 0
m_TextureHideFlags: 61
m_RenderIMGUI: 1
@@ -376,8 +376,8 @@ MonoBehaviour:
m_VRangeLocked: 0
hZoomLockedByDefault: 0
vZoomLockedByDefault: 0
m_HBaseRangeMin: -260.63998
m_HBaseRangeMax: 260.63998
m_HBaseRangeMin: -212.64001
m_HBaseRangeMax: 212.64001
m_VBaseRangeMin: -171.36
m_VBaseRangeMax: 171.36
m_HAllowExceedBaseRangeMin: 1
@@ -397,23 +397,23 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 21
width: 651.6
width: 531.60004
height: 428.4
m_Scale: {x: 1.1592735, y: 1.1592739}
m_Translation: {x: 325.79996, y: 214.2}
m_Scale: {x: 1.1940521, y: 1.1940521}
m_Translation: {x: 265.80002, y: 214.2}
m_MarginLeft: 0
m_MarginRight: 0
m_MarginTop: 0
m_MarginBottom: 0
m_LastShownAreaInsideMargins:
serializedVersion: 2
x: -281.03806
y: -184.77083
width: 562.0761
height: 369.54166
x: -222.60336
y: -179.38916
width: 445.20673
height: 358.77832
m_MinimalGUI: 1
m_defaultScale: 1
m_LastWindowPixelSize: {x: 814.5, y: 561.75}
m_LastWindowPixelSize: {x: 664.50006, y: 561.75}
m_ClearInEditMode: 1
m_NoCameraWarning: 1
m_LowResolutionForAspectRatios: 01000000000000000000
@@ -441,7 +441,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 73.6
width: 288.6
width: 295
height: 449.4
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@@ -450,9 +450,9 @@ MonoBehaviour:
m_SceneHierarchy:
m_TreeViewState:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: fea6ffff56a7ffffeca9fffffab9ffff52baffffdabcffff04bdffff66d5ffffbed5ffff46d8ffff70d8ffffc0f9ffff
m_SelectedIDs: be05fdff
m_LastClickedID: -195138
m_ExpandedIDs: 3277feff6277feff0e22ffff6622fffff222ffff142dffff6a2dffffd02fffffcc88ffffc2faffff2afbffff
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -496,9 +496,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 289.6
x: 296
y: 73.6
width: 224.4
width: 386.8
height: 449.4
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@@ -509,9 +509,9 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 1
snapOffset: {x: -98.400024, y: -26}
snapOffset: {x: 0, y: 24.8}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 3
snapCorner: 0
id: Tool Settings
index: 0
layout: 1
@@ -520,9 +520,9 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 1
snapOffset: {x: -141, y: -30.199982}
snapOffset: {x: 0, y: 24.8}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 3
snapCorner: 0
id: unity-grid-and-snap-toolbar
index: 1
layout: 1
@@ -564,9 +564,9 @@ MonoBehaviour:
floating: 0
collapsed: 0
displayed: 1
snapOffset: {x: -129.59999, y: -123.20001}
snapOffset: {x: 0, y: 24.8}
snapOffsetDelta: {x: 0, y: 0}
snapCorner: 3
snapCorner: 0
id: Orientation
index: 0
layout: 4
@@ -712,9 +712,9 @@ MonoBehaviour:
m_PlayAudio: 0
m_AudioPlay: 0
m_Position:
m_Target: {x: 10.033674, y: 2.385919, z: 7.089849}
m_Target: {x: 12.566701, y: 3.9675372, z: 0.014717923}
speed: 2
m_Value: {x: 10.033674, y: 2.385919, z: 7.089849}
m_Value: {x: 12.566701, y: 3.9675372, z: 0.014717923}
m_RenderMode: 0
m_CameraMode:
drawMode: 0
@@ -761,13 +761,13 @@ MonoBehaviour:
m_GridAxis: 1
m_gridOpacity: 0.5
m_Rotation:
m_Target: {x: -0.2721618, y: 0.02164445, z: -0.00612234, w: -0.9619917}
m_Target: {x: 0.12276869, y: -0.59779793, z: 0.09329085, w: 0.78668725}
speed: 2
m_Value: {x: -0.272161, y: 0.021644386, z: -0.006122322, w: -0.96198887}
m_Value: {x: 0.1227678, y: -0.5977936, z: 0.09329017, w: 0.78668153}
m_Size:
m_Target: 0.9635002
m_Target: 2.8332496
speed: 2
m_Value: 0.9635002
m_Value: 2.8332496
m_Ortho:
m_Target: 0
speed: 2
@@ -785,7 +785,7 @@ MonoBehaviour:
m_FarClip: 10000
m_DynamicClip: 1
m_OcclusionCulling: 0
m_LastSceneViewRotation: {x: -0.08717229, y: 0.89959055, z: -0.21045254, w: -0.3726226}
m_LastSceneViewRotation: {x: -0.057347883, y: 0.942116, z: -0.24952282, w: -0.21652032}
m_LastSceneViewOrtho: 0
m_ReplacementShader: {fileID: 0}
m_ReplacementString:
@@ -876,17 +876,18 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 0.8
y: 546.4
width: 676.6
height: 236.19998
x: 0
y: 544
width: 1217.4
height: 239.4
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
m_LastAppliedPresetName: Default
m_SaveData: []
m_SearchFilter:
m_NameFilter:
m_ClassNames: []
m_ClassNames:
- Prefab
m_AssetLabels: []
m_AssetBundleNames: []
m_VersionControlStates: []
@@ -896,37 +897,36 @@ MonoBehaviour:
m_ShowAllHits: 0
m_SkipHidden: 0
m_SearchArea: 1
m_Folders:
- Assets/Scenes
m_Folders: []
m_Globs: []
m_OriginalText:
m_ViewMode: 1
m_StartGridSize: 64
m_LastFolders:
- Assets/Scenes
- Assets/Objects/Weapons/M9
m_LastFoldersGridSize: -1
m_LastProjectPath: D:\.Downloads\Programming\Unity\Projects\Rheinmetall\3dshooter\3d-shooter
m_LockTracker:
m_IsLocked: 0
m_FolderTreeState:
scrollPos: {x: 0, y: 205}
m_SelectedIDs: fe640000
m_LastClickedID: 25854
m_ExpandedIDs: 000000008a6400008c6400008e64000090640000fc64000000ca9a3bffffff7f
scrollPos: {x: 0, y: 0}
m_SelectedIDs: 04ca9a3b
m_LastClickedID: 1000000004
m_ExpandedIDs: 00000000ea630000ec630000ee630000f06300007265000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name: Scripts
m_OriginalName: Scripts
m_Name:
m_OriginalName:
m_EditFieldRect:
serializedVersion: 2
x: 0
y: 0
width: 0
height: 0
m_UserData: 25742
m_UserData: 0
m_IsWaitingForDelay: 0
m_IsRenaming: 0
m_OriginalEventType: 0
m_OriginalEventType: 11
m_IsRenamingFilename: 1
m_ClientGUIView: {fileID: 12}
m_SearchString:
@@ -940,7 +940,7 @@ MonoBehaviour:
scrollPos: {x: 0, y: 0}
m_SelectedIDs:
m_LastClickedID: 0
m_ExpandedIDs: 000000008a6400008c6400008e64000090640000
m_ExpandedIDs: 00000000ea630000ec630000ee630000f06300007265000000ca9a3b
m_RenameOverlay:
m_UserAcceptedRename: 0
m_Name:
@@ -1018,7 +1018,7 @@ MonoBehaviour:
serializedVersion: 2
x: 0
y: 544
width: 1168.6
width: 1217.4
height: 239.4
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas:
@@ -1044,9 +1044,9 @@ MonoBehaviour:
m_Tooltip:
m_Pos:
serializedVersion: 2
x: 1169.6
x: 1218.4
y: 73.6
width: 365.40002
width: 316.59998
height: 709.8
m_ViewDataDictionary: {fileID: 0}
m_OverlayCanvas: