hiding place sctipts and player interaction
This commit is contained in:
@@ -243,7 +243,8 @@ Transform:
|
||||
m_LocalPosition: {x: 0, y: 0.76, z: 0}
|
||||
m_LocalScale: {x: 1, y: 1, z: 1}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Children:
|
||||
- {fileID: 2062222272}
|
||||
m_Father: {fileID: 1680796422}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &125071003
|
||||
@@ -260,6 +261,50 @@ MonoBehaviour:
|
||||
m_EditorClassIdentifier:
|
||||
mouseSensitivity: 20
|
||||
playerBody: {fileID: 1680796422}
|
||||
--- !u!1 &350938415
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 350938417}
|
||||
- component: {fileID: 350938416}
|
||||
m_Layer: 0
|
||||
m_Name: HidingPlaceManager
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!114 &350938416
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 350938415}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: 1d8a22ea902972845a8596763c2ecb09, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
--- !u!4 &350938417
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 350938415}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
|
||||
m_LocalPosition: {x: 0, y: 7.736, 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}
|
||||
--- !u!1 &420667094
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1002,6 +1047,7 @@ GameObject:
|
||||
- component: {fileID: 1680796419}
|
||||
- component: {fileID: 1680796423}
|
||||
- component: {fileID: 1680796424}
|
||||
- component: {fileID: 1680796426}
|
||||
- component: {fileID: 1680796425}
|
||||
m_Layer: 0
|
||||
m_Name: Player
|
||||
@@ -1254,6 +1300,127 @@ CharacterController:
|
||||
m_SkinWidth: 0.08
|
||||
m_MinMoveDistance: 0.001
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!114 &1680796426
|
||||
MonoBehaviour:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 1680796418}
|
||||
m_Enabled: 1
|
||||
m_EditorHideFlags: 0
|
||||
m_Script: {fileID: 11500000, guid: f1ab2c2e74d48ea4ba17dddc0ed0230c, type: 3}
|
||||
m_Name:
|
||||
m_EditorClassIdentifier:
|
||||
playerCamera: {fileID: 125071001}
|
||||
interactRange: 3
|
||||
holdPosition: {fileID: 2062222272}
|
||||
currentlyHeldEvidence: {fileID: 0}
|
||||
--- !u!1 &2062222271
|
||||
GameObject:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
serializedVersion: 6
|
||||
m_Component:
|
||||
- component: {fileID: 2062222272}
|
||||
- component: {fileID: 2062222275}
|
||||
- component: {fileID: 2062222274}
|
||||
- component: {fileID: 2062222273}
|
||||
m_Layer: 7
|
||||
m_Name: Hand
|
||||
m_TagString: Untagged
|
||||
m_Icon: {fileID: 0}
|
||||
m_NavMeshLayer: 0
|
||||
m_StaticEditorFlags: 0
|
||||
m_IsActive: 1
|
||||
--- !u!4 &2062222272
|
||||
Transform:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2062222271}
|
||||
serializedVersion: 2
|
||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||
m_LocalPosition: {x: 1.17, y: -0.59399974, z: 1.814}
|
||||
m_LocalScale: {x: 0.19999999, y: 0.2, z: 0.19999999}
|
||||
m_ConstrainProportionsScale: 0
|
||||
m_Children: []
|
||||
m_Father: {fileID: 125071002}
|
||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||
--- !u!65 &2062222273
|
||||
BoxCollider:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2062222271}
|
||||
m_Material: {fileID: 0}
|
||||
m_IncludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 4294967295
|
||||
m_ExcludeLayers:
|
||||
serializedVersion: 2
|
||||
m_Bits: 0
|
||||
m_LayerOverridePriority: 1
|
||||
m_IsTrigger: 0
|
||||
m_ProvidesContacts: 0
|
||||
m_Enabled: 1
|
||||
serializedVersion: 3
|
||||
m_Size: {x: 1, y: 1, z: 1}
|
||||
m_Center: {x: 0, y: 0, z: 0}
|
||||
--- !u!23 &2062222274
|
||||
MeshRenderer:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2062222271}
|
||||
m_Enabled: 1
|
||||
m_CastShadows: 1
|
||||
m_ReceiveShadows: 1
|
||||
m_DynamicOccludee: 1
|
||||
m_StaticShadowCaster: 0
|
||||
m_MotionVectors: 1
|
||||
m_LightProbeUsage: 1
|
||||
m_ReflectionProbeUsage: 1
|
||||
m_RayTracingMode: 2
|
||||
m_RayTraceProcedural: 0
|
||||
m_RenderingLayerMask: 1
|
||||
m_RendererPriority: 0
|
||||
m_Materials:
|
||||
- {fileID: 2100000, guid: 4e083d038de05807b8251393125f9200, type: 2}
|
||||
m_StaticBatchInfo:
|
||||
firstSubMesh: 0
|
||||
subMeshCount: 0
|
||||
m_StaticBatchRoot: {fileID: 0}
|
||||
m_ProbeAnchor: {fileID: 0}
|
||||
m_LightProbeVolumeOverride: {fileID: 0}
|
||||
m_ScaleInLightmap: 1
|
||||
m_ReceiveGI: 1
|
||||
m_PreserveUVs: 0
|
||||
m_IgnoreNormalsForChartDetection: 0
|
||||
m_ImportantGI: 0
|
||||
m_StitchLightmapSeams: 1
|
||||
m_SelectedEditorRenderState: 3
|
||||
m_MinimumChartSize: 4
|
||||
m_AutoUVMaxDistance: 0.5
|
||||
m_AutoUVMaxAngle: 89
|
||||
m_LightmapParameters: {fileID: 0}
|
||||
m_SortingLayerID: 0
|
||||
m_SortingLayer: 0
|
||||
m_SortingOrder: 0
|
||||
m_AdditionalVertexStreams: {fileID: 0}
|
||||
--- !u!33 &2062222275
|
||||
MeshFilter:
|
||||
m_ObjectHideFlags: 0
|
||||
m_CorrespondingSourceObject: {fileID: 0}
|
||||
m_PrefabInstance: {fileID: 0}
|
||||
m_PrefabAsset: {fileID: 0}
|
||||
m_GameObject: {fileID: 2062222271}
|
||||
m_Mesh: {fileID: 10202, guid: 0000000000000000e000000000000000, type: 0}
|
||||
--- !u!1660057539 &9223372036854775807
|
||||
SceneRoots:
|
||||
m_ObjectHideFlags: 0
|
||||
@@ -1262,3 +1429,4 @@ SceneRoots:
|
||||
- {fileID: 463387416}
|
||||
- {fileID: 1680796422}
|
||||
- {fileID: 1351275945}
|
||||
- {fileID: 350938417}
|
||||
|
||||
23
Assets/Scripts/Evidence.cs
Normal file
23
Assets/Scripts/Evidence.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
|
||||
public class Evidence : MonoBehaviour, IInteractable
|
||||
{
|
||||
public ItemType type;
|
||||
public bool isContraband;
|
||||
|
||||
public string GetInteractionText(PlayerInteraction player)
|
||||
{
|
||||
// Ha már van nála valami, nem veheti fel
|
||||
if (player.GetHeldEvidence() != null) return "Tele van a kezed!";
|
||||
return $"Felvétel: {type}";
|
||||
}
|
||||
|
||||
public void Interact(PlayerInteraction player)
|
||||
{
|
||||
// Ha üres a keze, odaadjuk neki ezt a tárgyat
|
||||
if (player.GetHeldEvidence() == null)
|
||||
{
|
||||
player.PickUpItem(this);
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/Evidence.cs.meta
Normal file
11
Assets/Scripts/Evidence.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f4f90c9a94952804f9fb058c3f40aa48
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
23
Assets/Scripts/HidingPlaceManager.cs
Normal file
23
Assets/Scripts/HidingPlaceManager.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
|
||||
public class HidingPlaceManager : MonoBehaviour
|
||||
{
|
||||
public static HidingPlaceManager Instance { get; private set; }
|
||||
|
||||
// Az összes pályán lévő rejtekhely
|
||||
private HidingSpot[] allHidingSpots;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
Instance = this;
|
||||
allHidingSpots = FindObjectsOfType<HidingSpot>();
|
||||
}
|
||||
|
||||
// A rendőrök ezt hívják meg, amikor bejönnek
|
||||
public List<HidingSpot> GetSpotsForPoliceToCheck()
|
||||
{
|
||||
return allHidingSpots.OrderBy(x => Random.value).Take(Mathf.Max(1, allHidingSpots.Length / 3)).ToList();
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/HidingPlaceManager.cs.meta
Normal file
11
Assets/Scripts/HidingPlaceManager.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 1d8a22ea902972845a8596763c2ecb09
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
52
Assets/Scripts/HidingSpot.cs
Normal file
52
Assets/Scripts/HidingSpot.cs
Normal file
@@ -0,0 +1,52 @@
|
||||
using UnityEngine;
|
||||
using System.Collections.Generic;
|
||||
|
||||
public class HidingSpot : MonoBehaviour, IInteractable
|
||||
{
|
||||
public string spotName;
|
||||
public List<HidingStep> steps;
|
||||
|
||||
private int currentStepIndex = 0;
|
||||
public bool IsFullyHidden => currentStepIndex >= steps.Count;
|
||||
public bool ContainsContraband { get; private set; }
|
||||
|
||||
public string GetInteractionText(PlayerInteraction player)
|
||||
{
|
||||
if (IsFullyHidden) return "Kész!";
|
||||
|
||||
HidingStep nextStep = steps[currentStepIndex];
|
||||
ItemType playerHeldItem = player.GetHeldItemType();
|
||||
|
||||
if (playerHeldItem == nextStep.requiredItem)
|
||||
{
|
||||
return nextStep.promptText;
|
||||
}
|
||||
|
||||
return $"Szükséged van erre: {nextStep.requiredItem}";
|
||||
}
|
||||
|
||||
public void Interact(PlayerInteraction player)
|
||||
{
|
||||
if (IsFullyHidden) return;
|
||||
|
||||
HidingStep nextStep = steps[currentStepIndex];
|
||||
Evidence heldEvidence = player.GetHeldEvidence();
|
||||
|
||||
if (heldEvidence != null && heldEvidence.type == nextStep.requiredItem)
|
||||
{
|
||||
if (heldEvidence.isContraband) ContainsContraband = true;
|
||||
|
||||
// Tárgy eltávolítása a kézből
|
||||
if (nextStep.consumeItem)
|
||||
{
|
||||
player.RemoveHeldItem();
|
||||
Destroy(heldEvidence.gameObject);
|
||||
}
|
||||
|
||||
nextStep.OnStepCompleted?.Invoke();
|
||||
|
||||
currentStepIndex++;
|
||||
Debug.Log($"{spotName}: Lépés teljesítve! ({currentStepIndex}/{steps.Count})");
|
||||
}
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/HidingSpot.cs.meta
Normal file
11
Assets/Scripts/HidingSpot.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 0d232895ff247e2459b377608e035d43
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
19
Assets/Scripts/HidingStep.cs
Normal file
19
Assets/Scripts/HidingStep.cs
Normal file
@@ -0,0 +1,19 @@
|
||||
using System;
|
||||
using UnityEngine;
|
||||
using UnityEngine.Events;
|
||||
|
||||
[Serializable]
|
||||
public class HidingStep
|
||||
{
|
||||
[Tooltip("A UI-on megjelenő szöveg ehhez a lépéshez, pl: 'Öntsd be a port'")]
|
||||
public string promptText;
|
||||
|
||||
[Tooltip("Milyen tárgy kell ehhez a lépéshez?")]
|
||||
public ItemType requiredItem;
|
||||
|
||||
[Tooltip("Elpusztuljon a tárgy a játékos kezéből a lépés után?")]
|
||||
public bool consumeItem = true;
|
||||
|
||||
[Tooltip("Mi történjen vizuálisan? (Animáció, hang, stb.)")]
|
||||
public UnityEvent OnStepCompleted;
|
||||
}
|
||||
11
Assets/Scripts/HidingStep.cs.meta
Normal file
11
Assets/Scripts/HidingStep.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 5ee8deea0525ef44fab0f5bcb9cdd67a
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
6
Assets/Scripts/IInteractable.cs
Normal file
6
Assets/Scripts/IInteractable.cs
Normal file
@@ -0,0 +1,6 @@
|
||||
public interface IInteractable
|
||||
{
|
||||
// Átadjuk a playert, hogy tudjuk, mivel interaktál
|
||||
void Interact(PlayerInteraction player);
|
||||
string GetInteractionText(PlayerInteraction player);
|
||||
}
|
||||
11
Assets/Scripts/IInteractable.cs.meta
Normal file
11
Assets/Scripts/IInteractable.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 57babe414c5fd5846a8d5fd7b8c2e1e9
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
1
Assets/Scripts/ItemType.cs
Normal file
1
Assets/Scripts/ItemType.cs
Normal file
@@ -0,0 +1 @@
|
||||
public enum ItemType { None, Powder, Body, Flour, Sunglasses, MixerBowl }
|
||||
11
Assets/Scripts/ItemType.cs.meta
Normal file
11
Assets/Scripts/ItemType.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: 067ef8f9a44619948a54f090a09cfd33
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
108
Assets/Scripts/PlayerInteraction.cs
Normal file
108
Assets/Scripts/PlayerInteraction.cs
Normal file
@@ -0,0 +1,108 @@
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
public class PlayerInteraction : MonoBehaviour
|
||||
{
|
||||
[Header("Beállítások")]
|
||||
public Camera playerCamera;
|
||||
public float interactRange = 3f;
|
||||
public Transform holdPosition; // Egy üres GameObject a kamera előtt, ahova a felvett tárgy ugrik
|
||||
|
||||
[Header("Állapot (Inspectorban látható)")]
|
||||
[SerializeField] private Evidence currentlyHeldEvidence = null;
|
||||
|
||||
private InputMaster input;
|
||||
private IInteractable currentTarget;
|
||||
|
||||
private void Awake()
|
||||
{
|
||||
input = new InputMaster();
|
||||
input.Player.Fire.Enable();
|
||||
input.Player.Fire.performed += ctx => OnInteract();
|
||||
}
|
||||
|
||||
private void OnEnable() => input.Enable();
|
||||
private void OnDisable() => input.Disable();
|
||||
|
||||
private void Update()
|
||||
{
|
||||
// 1. LÁTÁS: Raycast a kamera közepéből
|
||||
Ray ray = new Ray(playerCamera.transform.position, playerCamera.transform.forward);
|
||||
RaycastHit hit;
|
||||
|
||||
if (Physics.Raycast(ray, out hit, interactRange))
|
||||
{
|
||||
// Megnézzük, van-e a célpontba vett tárgyon IInteractable (pl. HidingSpot vagy Evidence)
|
||||
IInteractable interactable = hit.collider.GetComponent<IInteractable>();
|
||||
|
||||
if (interactable != null)
|
||||
{
|
||||
currentTarget = interactable;
|
||||
|
||||
// Itt tudod frissíteni a UI-t! Pl:
|
||||
// UIManager.Instance.ShowCrosshairText(currentTarget.GetInteractionText(this));
|
||||
} else
|
||||
{
|
||||
ClearTarget();
|
||||
}
|
||||
} else
|
||||
{
|
||||
ClearTarget();
|
||||
}
|
||||
}
|
||||
|
||||
private void ClearTarget()
|
||||
{
|
||||
currentTarget = null;
|
||||
// UIManager.Instance.HideCrosshairText();
|
||||
}
|
||||
|
||||
// 2. CSELEKVÉS: Ezt hívja meg az Input System, ha kattintottál
|
||||
private void OnInteract()
|
||||
{
|
||||
if (currentTarget != null)
|
||||
{
|
||||
// Átadjuk "saját magunkat" (this), hogy a rejtekhely tudja, minket kell vizsgálni
|
||||
currentTarget.Interact(this);
|
||||
}
|
||||
}
|
||||
|
||||
// 3. INVENTORY RENDSZER (A Rejtekhelyek ezeket hívják meg)
|
||||
|
||||
// Lekéri, mit tartunk a kézben
|
||||
public ItemType GetHeldItemType()
|
||||
{
|
||||
if (currentlyHeldEvidence != null)
|
||||
return currentlyHeldEvidence.type;
|
||||
|
||||
return ItemType.None;
|
||||
}
|
||||
|
||||
public Evidence GetHeldEvidence()
|
||||
{
|
||||
return currentlyHeldEvidence;
|
||||
}
|
||||
|
||||
// A rejtekhely hívja meg, amikor elnyeli a tárgyat
|
||||
public void RemoveHeldItem()
|
||||
{
|
||||
currentlyHeldEvidence = null;
|
||||
}
|
||||
|
||||
// A felvehető tárgyak (Evidence) hívják meg magukon, amikor rákattintasz
|
||||
public void PickUpItem(Evidence newEvidence)
|
||||
{
|
||||
if (currentlyHeldEvidence != null) return; // Már tele van a kezünk
|
||||
|
||||
currentlyHeldEvidence = newEvidence;
|
||||
|
||||
// Vizuálisan a kezünkbe (kamera elé) tesszük a tárgyat
|
||||
currentlyHeldEvidence.transform.SetParent(holdPosition);
|
||||
currentlyHeldEvidence.transform.localPosition = Vector3.zero;
|
||||
currentlyHeldEvidence.transform.localRotation = Quaternion.identity;
|
||||
|
||||
// Kikapcsoljuk a fizikáját, hogy ne essen le
|
||||
if (currentlyHeldEvidence.TryGetComponent(out Rigidbody rb)) rb.isKinematic = true;
|
||||
if (currentlyHeldEvidence.TryGetComponent(out Collider col)) col.enabled = false;
|
||||
}
|
||||
}
|
||||
11
Assets/Scripts/PlayerInteraction.cs.meta
Normal file
11
Assets/Scripts/PlayerInteraction.cs.meta
Normal file
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: f1ab2c2e74d48ea4ba17dddc0ed0230c
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
@@ -58,4 +58,10 @@ public class PlayerMovement : MonoBehaviour
|
||||
_inputMaster.Player.Move.Disable();
|
||||
_inputMaster.Player.Jump.Disable();
|
||||
}
|
||||
|
||||
private void OnEnable()
|
||||
{
|
||||
_inputMaster.Player.Move.Enable();
|
||||
_inputMaster.Player.Jump.Enable();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user