adding in some needed packages

This commit is contained in:
reisenlol 2026-01-02 01:31:54 -08:00
parent 9e739f5dc8
commit aba5310742
No known key found for this signature in database
1012 changed files with 494191 additions and 1 deletions

View file

@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: 90252a6eb170c2e43adb15b74b359f61, type: 3}
m_Name: AI Think Tick
m_EditorClassIdentifier:
value: 0.2

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 23c9ce97f90a53f4facc7dbc866a6266
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: 90252a6eb170c2e43adb15b74b359f61, type: 3}
m_Name: Attack Tick Time Delay
m_EditorClassIdentifier:
value: 0.05

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: 344edf242523acf4391c67d8af07e22f
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,15 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!114 &11400000
MonoBehaviour:
m_ObjectHideFlags: 0
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: 11500000, guid: 90252a6eb170c2e43adb15b74b359f61, type: 3}
m_Name: Tick Added Time Delay
m_EditorClassIdentifier:
value: 0.05

View file

@ -0,0 +1,8 @@
fileFormatVersion: 2
guid: ee65d6162bab18a449b722c8e5875d94
NativeFormatImporter:
externalObjects: {}
mainObjectFileID: 11400000
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,50 @@
%YAML 1.1
%TAG !u! tag:unity3d.com,2011:
--- !u!1 &8122288326571653546
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 674487647757853909}
- component: {fileID: 1776312073029048188}
m_Layer: 0
m_Name: Tick Manager
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
--- !u!4 &674487647757853909
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8122288326571653546}
serializedVersion: 2
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0.0006624787}
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!114 &1776312073029048188
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 8122288326571653546}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: 03450992566b3c246967750781c939ce, type: 3}
m_Name:
m_EditorClassIdentifier:
attackTickSO: {fileID: 11400000, guid: 344edf242523acf4391c67d8af07e22f, type: 2}
mainTickDuration: 0.05
mainTickSO: {fileID: 11400000, guid: ee65d6162bab18a449b722c8e5875d94, type: 2}
AITickTime: {fileID: 11400000, guid: 23c9ce97f90a53f4facc7dbc866a6266, type: 2}

View file

@ -0,0 +1,7 @@
fileFormatVersion: 2
guid: 928fac19cedde1f4faa49dc7f6add60a
PrefabImporter:
externalObjects: {}
userData:
assetBundleName:
assetBundleVariant:

View file

@ -0,0 +1,104 @@
using Core.Extensions;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
namespace Bremsengine
{
#region Attack Tick
public partial class TickManager
{
public static bool WasAttackTickThisFrame;
public FloatSO attackTickSO;
float attackTickDuration = 0.05f;
float lastAttackTickTime;
public static float AttackTickLength => instance == null ? 0.05f : instance.attackTickSO == null ? (instance.attackTickDuration) : instance.attackTickSO;
public void RunAttackTick(float time)
{
WasAttackTickThisFrame = false;
if (time > lastAttackTickTime + AttackTickLength)
{
WasAttackTickThisFrame = true;
lastAttackTickTime = time;
}
}
}
#endregion
#region Main Tick
public partial class TickManager
{
public static bool WasMainTickThisFrame;
public static GameTick MainTick;
public static GameTickLightweight MainTickLightweight;
float lastMainTickTime;
static int tickCount = 0;
public static int CurrentTick => tickCount;
[Range(0.02f, 1f)]
[SerializeField] float mainTickDuration = 0.5f;
[SerializeField] FloatSO mainTickSO;
public static float TickLength => instance == null ? 0.5f : instance.mainTickSO == null ? (instance.mainTickDuration) : instance.mainTickSO;
public void RunMainTick(float time)
{
WasMainTickThisFrame = false;
if (time > lastMainTickTime + TickLength)
{
WasMainTickThisFrame = true;
tickCount++;
MainTick?.Invoke(tickCount, time - lastMainTickTime);
MainTickLightweight?.Invoke();
lastMainTickTime = time;
}
}
}
#region AI Think
public partial class TickManager
{
float lastAITickTime;
public static GameTickLightweight AIThinkTick;
[SerializeField] FloatSO AITickTime;
public static bool WasAIThinkTickThisFrame;
public void RunAIThinkTick(float time)
{
WasAIThinkTickThisFrame = false;
if (time > lastAITickTime + (AITickTime == null ? 0.2f : AITickTime))
{
WasAIThinkTickThisFrame = true;
lastAITickTime = time;
AIThinkTick?.Invoke();
}
}
}
#endregion
#endregion
public partial class TickManager : MonoBehaviour
{
static TickManager instance;
public delegate void GameTick(int tick, float tickDeltaTime);
public delegate void GameTickLightweight();
private void Awake()
{
if (instance != null)
{
Destroy(gameObject);
return;
}
transform.SetParent(null);
instance = this;
DontDestroyOnLoad(gameObject);
}
private void Update()
{
if (instance != this)
{
return;
}
RunMainTick(Time.time);
RunAttackTick(Time.time);
RunAIThinkTick(Time.time);
}
private void OnValidate()
{
if (mainTickSO != null) mainTickDuration = mainTickSO;
}
}
}

View file

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: 03450992566b3c246967750781c939ce
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: -50
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant: