1
This commit is contained in:
45
Assets/Artists/Scripts/Editor/BITFALLDebuger.cs
Normal file
45
Assets/Artists/Scripts/Editor/BITFALLDebuger.cs
Normal file
@@ -0,0 +1,45 @@
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Security;
|
||||
using BITKit.Entities;
|
||||
using BITKit.Entities.Player;
|
||||
using UnityEngine;
|
||||
using UnityEngine.InputSystem;
|
||||
|
||||
namespace BITFALL.Editor
|
||||
{
|
||||
public class BITFALLDebuger : MonoBehaviour
|
||||
{
|
||||
[SerializeReference,SubclassSelector]
|
||||
private IPlayerService playerService;
|
||||
private void Update()
|
||||
{
|
||||
if (Keyboard.current.numpad0Key.wasPressedThisFrame)
|
||||
{
|
||||
playerService.LocalPlayer.Get<IHealth>().HealthPoint = 100;
|
||||
}
|
||||
if (Keyboard.current.numpad1Key.wasPressedThisFrame)
|
||||
{
|
||||
playerService.LocalPlayer.Get<IHealth>().HealthPoint = -1;
|
||||
}
|
||||
|
||||
if (Keyboard.current.numpadPlusKey.wasPressedThisFrame)
|
||||
{
|
||||
Time.timeScale = Mathf.Clamp(Time.timeScale + 0.2f, 0, 2);
|
||||
Debug.Log(Time.timeScale);
|
||||
}
|
||||
if (Keyboard.current.numpadMinusKey.wasPressedThisFrame)
|
||||
{
|
||||
Time.timeScale = Mathf.Clamp(Time.timeScale - 0.2f, 0, 2);
|
||||
Debug.Log(Time.timeScale);
|
||||
}
|
||||
}
|
||||
|
||||
private void OnDestroy()
|
||||
{
|
||||
Time.timeScale = 1;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user