Fix unity warnings
This commit is contained in:
@@ -14,7 +14,7 @@ public class InGameMouseHandler : UnityEngine.Object
|
||||
private Camera _camera;
|
||||
|
||||
private BaseInteractableObject _selectedObject;
|
||||
|
||||
private bool _pressControl = false;
|
||||
|
||||
public InGameMouseHandler(Camera camera)
|
||||
{
|
||||
@@ -35,8 +35,9 @@ public class InGameMouseHandler : UnityEngine.Object
|
||||
|
||||
private void ClickToMove(InputAction.CallbackContext context)
|
||||
{
|
||||
if (!EventSystem.current.IsPointerOverGameObject())
|
||||
if (_pressControl)
|
||||
{
|
||||
_pressControl = false;
|
||||
GameManager.Instance.UI.ClosePopupMenu();
|
||||
|
||||
if (_selectedObject != null)
|
||||
@@ -57,6 +58,9 @@ public class InGameMouseHandler : UnityEngine.Object
|
||||
|
||||
public void Update()
|
||||
{
|
||||
if (Mouse.current.leftButton.wasPressedThisFrame)
|
||||
_pressControl = !EventSystem.current.IsPointerOverGameObject(PointerInputModule.kMouseLeftId);
|
||||
|
||||
_ray = _camera.ScreenPointToRay(Mouse.current.position.ReadValue());
|
||||
if (Physics.Raycast(_ray, out var mouseRaycastHit, 100f, _selectableLayerMask))
|
||||
{
|
||||
|
||||
@@ -1,7 +1,7 @@
|
||||
//------------------------------------------------------------------------------
|
||||
// <auto-generated>
|
||||
// This code was auto-generated by com.unity.inputsystem:InputActionCodeGenerator
|
||||
// version 1.7.0
|
||||
// version 1.8.1
|
||||
// from Assets/Scripts/Managers/InputSystem/InputActions.inputactions
|
||||
//
|
||||
// Changes to this file may cause incorrect behavior and will be lost if
|
||||
@@ -14,6 +14,7 @@ using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using UnityEngine.InputSystem;
|
||||
using UnityEngine.InputSystem.Utilities;
|
||||
using UnityEngine;
|
||||
|
||||
public partial class @InputActions: IInputActionCollection2, IDisposable
|
||||
{
|
||||
@@ -264,6 +265,12 @@ public partial class @InputActions: IInputActionCollection2, IDisposable
|
||||
m_Camera_Zoom = m_Camera.FindAction("Zoom", throwIfNotFound: true);
|
||||
}
|
||||
|
||||
~@InputActions()
|
||||
{
|
||||
Debug.Assert(!m_Player.enabled, "This will cause a leak and performance issues, InputActions.Player.Disable() has not been called.");
|
||||
Debug.Assert(!m_Camera.enabled, "This will cause a leak and performance issues, InputActions.Camera.Disable() has not been called.");
|
||||
}
|
||||
|
||||
public void Dispose()
|
||||
{
|
||||
UnityEngine.Object.Destroy(asset);
|
||||
|
||||
@@ -138,9 +138,10 @@ public abstract class BaseCharacter : MonoBehaviour
|
||||
{
|
||||
return;
|
||||
}
|
||||
var stringStatte=PlayerHelper.GetEnumMemberValue(newState);
|
||||
stringStatte= string.Format(stringStatte,_characterSex.ToString());
|
||||
_animator.Play(stringStatte);
|
||||
var stringState=PlayerHelper.GetEnumMemberValue(newState);
|
||||
stringState= string.Format(stringState,_characterSex.ToString());
|
||||
Debug.Log($"Animation state {stringState}");
|
||||
_animator.Play(stringState);
|
||||
_currentAnimation = newState;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user