Skip to content

Commit

Permalink
refactor: Removed implemented fighter classes.
Browse files Browse the repository at this point in the history
BREAKING CHANGE: Removed implemented fighter classes (hurtboxmanager, statemanager, etc.). Actual implementation depends from game to game, rather put things like this in a sample.
  • Loading branch information
christides11 committed Feb 19, 2022
1 parent 493c864 commit 329c74a
Show file tree
Hide file tree
Showing 27 changed files with 115 additions and 798 deletions.
15 changes: 15 additions & 0 deletions Assembly-CSharp.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -706,6 +706,21 @@
</Reference>
<Reference Include="Unity.RenderPipelines.Core.Editor">
<HintPath>C:/Projects/Unity/hack-and-slash-framework/Library/ScriptAssemblies/Unity.RenderPipelines.Core.Editor.dll</HintPath>
</Reference>
<Reference Include="Unity.Timeline">
<HintPath>C:/Projects/Unity/hack-and-slash-framework/Library/ScriptAssemblies/Unity.Timeline.dll</HintPath>
</Reference>
<Reference Include="Unity.Timeline.Editor">
<HintPath>C:/Projects/Unity/hack-and-slash-framework/Library/ScriptAssemblies/Unity.Timeline.Editor.dll</HintPath>
</Reference>
<Reference Include="Juce.ImplementationSelector.Runtime">
<HintPath>C:/Projects/Unity/hack-and-slash-framework/Library/ScriptAssemblies/Juce.ImplementationSelector.Runtime.dll</HintPath>
</Reference>
<Reference Include="Juce.ImplementationSelector.Editor">
<HintPath>C:/Projects/Unity/hack-and-slash-framework/Library/ScriptAssemblies/Juce.ImplementationSelector.Editor.dll</HintPath>
</Reference>
<Reference Include="Juce.ImplementationSelector.Examples">
<HintPath>C:/Projects/Unity/hack-and-slash-framework/Library/ScriptAssemblies/Juce.ImplementationSelector.Examples.dll</HintPath>
</Reference>
</ItemGroup>
<ItemGroup>
Expand Down
5 changes: 4 additions & 1 deletion Assets/HnSF/Editor/HnSF.Editor.asmdef
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
{
"name": "HnSF.Editor",
"rootNamespace": "",
"references": [
"GUID:60e386f2aae2e3745835ad13422e215a",
"GUID:b8e24fd1eb19b4226afebb2810e3c19b",
"GUID:002c1bbed08fa44d282ef34fd5edb138",
"GUID:466d4cb32fd66ef4f99747d4eb7191d9",
"GUID:d178ac4b10764814c8ae876ce6354d19"
"GUID:d178ac4b10764814c8ae876ce6354d19",
"GUID:f06555f75b070af458a003d92f9efb00",
"GUID:02f771204943f4a40949438e873e3eff"
],
"includePlatforms": [
"Editor"
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

20 changes: 20 additions & 0 deletions Assets/HnSF/Editor/State/StateTimelineEditor.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;

namespace HnSF
{
[CustomEditor(typeof(StateTimeline), true)]
public class StateTimelineEditor : Editor
{
public override void OnInspectorGUI()
{
StateTimeline st = (StateTimeline)target;

st.totalFrames = (int)(st.duration / (1.0f / 60.0f));
GUILayout.Label($"Total Frames: {st.totalFrames}", EditorStyles.boldLabel);
//base.OnInspectorGUI();
}
}
}

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

55 changes: 0 additions & 55 deletions Assets/HnSF/Fighter/FighterStateBase.cs

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,7 @@ public interface IFighterCombatManager
/// </summary>
MovesetAttackNode CurrentAttackNode { get; }
int CurrentAttackNodeIdentifier { get; }

void CLateUpdate();

int GetMovesetCount();
MovesetDefinition GetMoveset(int index);
void Cleanup();
Expand Down
15 changes: 15 additions & 0 deletions Assets/HnSF/Fighter/IFighterStateManager.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
namespace HnSF.Fighters
{
public interface IFighterStateManager
{
int CurrentState { get; }
int CurrentStateFrame { get; }

void AddState(StateTimeline state, int stateNumber);
void RemoveState(int stateNumber);
bool ChangeState(int state, int stateFrame = 0, bool callOnInterrupt = true);
StateTimeline GetState(int state);
void SetFrame(int frame);
void IncrementFrame();
}
}
Loading

0 comments on commit 329c74a

Please sign in to comment.