Skip to content

Commit 1e87ead

Browse files
Merge pull request #83 from PaulNonatomic/develop
Develop
2 parents 55313b2 + 304f948 commit 1e87ead

21 files changed

Lines changed: 157 additions & 18 deletions

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
# Change Log
22

3+
## [0.6.4-beta] - Aug 12, 2024
4+
- Fix for rogue tilda
5+
- Added relay states
6+
37
## [0.6.3-beta] - Aug 10, 2024
48
- Added Counter State
59
- Fix: When scenes with multiple StateMachineControllers load the selected controller and the first controller in the scene were both loaded into the same StateMachineEditor

Editor/Resources/RelayNodeView.uss

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
.node #title {
2+
flex-direction: row;
3+
height: 19px;
4+
}
5+
6+
.node Port {
7+
height: 19px;
8+
padding-top:0px;
9+
}
10+
11+
.port.input {
12+
background-color: #555555;
13+
}
14+
15+
.port.output {
16+
background-color: #777777;
17+
}
18+
19+
.port.input #connector {
20+
border-left-color: white;
21+
}
22+
23+
.node #title-label {
24+
font-size: 14px;
25+
margin-left: 0px;
26+
margin-right: 0px;
27+
flex-grow: 1;
28+
-unity-text-align: middle-center;
29+
-unity-font-style: Bold;
30+
}
31+
32+
.node #title-container {
33+
margin-top: 0px;
34+
margin-bottom: 0px;
35+
flex-direction: row;
36+
}
37+
38+
.node #title-button-container {
39+
visibility: hidden;
40+
width:0;
41+
height:0;
42+
}
43+
44+
.node #state-border {
45+
position: absolute;
46+
right: 0;
47+
left: 0;
48+
top: 0;
49+
bottom: 0;
50+
border-color: green;
51+
border-width: 2px;
52+
border-radius: 8px;
53+
opacity:0;
54+
margin:1px;
55+
}
56+
57+
Port {
58+
height: 100%;
59+
width: 25px;
60+
min-width: 25px;
61+
padding-top:8px;
62+
}
63+
64+
Port Label {
65+
display: none;
66+
}
67+
68+
.node #contents {
69+
display: none;
70+
}

Editor/Resources/RelayNodeView.uss.meta

Lines changed: 3 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Editor/StateGraph/Factories/StateGraphNodeFactory.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,7 @@ public static class StateGraphNodeFactory
1818
{typeof(JumpInState), typeof(JumpNodeView)},
1919
{typeof(JumpOutState), typeof(JumpNodeView)},
2020
{typeof(DelayState), typeof(DelayNodeView)},
21+
{typeof(RelayState), typeof(RelayNodeView)},
2122
{typeof(CounterState), typeof(CounterNodeView)},
2223
{typeof(DelayUnscaledState), typeof(DelayNodeView)},
2324
{typeof(SubStateMachineState), typeof(SubStateNodeView)},

Editor/StateGraph/Nodes/BaseStateNodeView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -338,7 +338,7 @@ protected virtual void AddEditButton()
338338
if(!NodeModel?.State) return;
339339

340340
var stateNamespace = NodeModel.State.GetType().Namespace;
341-
if (stateNamespace == "Nonatomic.VSM2.StateGraph.States") return;
341+
if (stateNamespace == "Nonatomic.VSM2.StateGraph.States~") return;
342342

343343
var editButton = new Button(HandleEditButton)
344344
{

Editor/StateGraph/Nodes/CounterNodeView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ public CounterNodeView(GraphView graphView,
2020

2121
_counterState = (BaseCounterState) nodeModel.State;
2222

23-
AddStyle("CounterNodeView");
23+
AddStyle(nameof(CounterNodeView));
2424
AddTitleContainer();
2525
ColorizeTitle();
2626
RemoveTitleLabel();

Editor/StateGraph/Nodes/DelayNodeView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ public DelayNodeView(GraphView graphView,
1818
: base(graphView, stateMachineModel, nodeModel)
1919
{
2020

21-
AddStyle("DelayNodeView");
21+
AddStyle(nameof(DelayNodeView));
2222
AddTitleContainer();
2323
ColorizeTitle();
2424
RemoveTitleLabel();

Editor/StateGraph/Nodes/EntryNodeView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public EntryNodeView(GraphView graphView,
1111
: base(graphView, stateMachineModel, nodeModel)
1212
{
1313

14-
AddStyle("EntryNodeView");
14+
AddStyle(nameof(EntryNodeView));
1515
AddTitleContainer();
1616
ColorizeTitle();
1717
AddTitleLabel();

Editor/StateGraph/Nodes/ExitNodeView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ public ExitNodeView(GraphView graphView,
1111
StateNodeModel nodeModel)
1212
: base(graphView, stateMachineModel, nodeModel)
1313
{
14-
AddStyle("ExitNodeView");
14+
AddStyle(nameof(ExitNodeView));
1515
AddTitleContainer();
1616
ColorizeTitle();
1717
AddTitleLabel();

Editor/StateGraph/Nodes/JumpNodeView.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ public JumpNodeView(GraphView graphView,
2626
{
2727
_jumpState = NodeModel.State as JumpState;
2828

29-
AddStyle("JumpNodeView");
29+
AddStyle(nameof(JumpNodeView));
3030
AddToClassList(NodeModel.State is JumpOutState ? "jump-out" : "jump-in");
3131
AddBeacon(_jumpState);
3232
AddTitleContainer();

0 commit comments

Comments
 (0)