Skip to content

Commit

Permalink
Merge branch '2.3'
Browse files Browse the repository at this point in the history
  • Loading branch information
RealityStop committed Oct 13, 2018
2 parents 97abc4d + 11a6175 commit 3481581
Show file tree
Hide file tree
Showing 37 changed files with 942 additions and 36 deletions.
63 changes: 63 additions & 0 deletions src/Bolt.Addons.Community.sln
Original file line number Diff line number Diff line change
Expand Up @@ -28,51 +28,114 @@ Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bolt.Addons.Community.Funda
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bolt.Addons.Community.Events", "Events\Bolt.Addons.Community.Events.csproj", "{33411767-CA47-4D3B-A82C-D77AB4C5FA97}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "API Documentation", "API Documentation", "{E404D72B-E478-4BE1-8DFE-6DBEAD56B784}"
ProjectSection(SolutionItems) = preProject
Event Types.txt = Event Types.txt
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Utility", "Utility", "{4C7742BC-F6EB-463D-BB44-2783BEC16520}"
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Events", "Events", "{7D856461-F36E-4843-AA41-C908A2FA7E2C}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bolt.Addons.Community.Utility", "Utility\Bolt.Addons.Community.Utility.csproj", "{A2FDB1FB-E259-45C0-B46A-4E416110BBB3}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "Bolt.Addons.Community.Utility.Editor", "Utility\Bolt.Addons.Community.Utility.Editor.csproj", "{FCADD801-FF9E-46E5-A573-E06FA0C8661B}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
Release3.5|Any CPU = Release3.5|Any CPU
Release4.6|Any CPU = Release4.6|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{A48FB4F2-A962-4628-8F1E-35191B078F43}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{A48FB4F2-A962-4628-8F1E-35191B078F43}.Release|Any CPU.ActiveCfg = Release|Any CPU
{A48FB4F2-A962-4628-8F1E-35191B078F43}.Release3.5|Any CPU.ActiveCfg = Release|Any CPU
{A48FB4F2-A962-4628-8F1E-35191B078F43}.Release4.6|Any CPU.ActiveCfg = Release|Any CPU
{63E0BE87-2979-4275-A37E-B7F8CBD365F9}.Debug|Any CPU.ActiveCfg = Release4.6|Any CPU
{63E0BE87-2979-4275-A37E-B7F8CBD365F9}.Debug|Any CPU.Build.0 = Release4.6|Any CPU
{63E0BE87-2979-4275-A37E-B7F8CBD365F9}.Release|Any CPU.ActiveCfg = Release4.6|Any CPU
{63E0BE87-2979-4275-A37E-B7F8CBD365F9}.Release|Any CPU.Build.0 = Release4.6|Any CPU
{63E0BE87-2979-4275-A37E-B7F8CBD365F9}.Release3.5|Any CPU.ActiveCfg = Release3.5|Any CPU
{63E0BE87-2979-4275-A37E-B7F8CBD365F9}.Release3.5|Any CPU.Build.0 = Release3.5|Any CPU
{63E0BE87-2979-4275-A37E-B7F8CBD365F9}.Release4.6|Any CPU.ActiveCfg = Release4.6|Any CPU
{63E0BE87-2979-4275-A37E-B7F8CBD365F9}.Release4.6|Any CPU.Build.0 = Release4.6|Any CPU
{A92A0A22-56D4-4B8A-9623-913B6846A106}.Debug|Any CPU.ActiveCfg = Release4.6|Any CPU
{A92A0A22-56D4-4B8A-9623-913B6846A106}.Debug|Any CPU.Build.0 = Release4.6|Any CPU
{A92A0A22-56D4-4B8A-9623-913B6846A106}.Release|Any CPU.ActiveCfg = Release4.6|Any CPU
{A92A0A22-56D4-4B8A-9623-913B6846A106}.Release|Any CPU.Build.0 = Release4.6|Any CPU
{A92A0A22-56D4-4B8A-9623-913B6846A106}.Release3.5|Any CPU.ActiveCfg = Release3.5|Any CPU
{A92A0A22-56D4-4B8A-9623-913B6846A106}.Release3.5|Any CPU.Build.0 = Release3.5|Any CPU
{A92A0A22-56D4-4B8A-9623-913B6846A106}.Release4.6|Any CPU.ActiveCfg = Release4.6|Any CPU
{A92A0A22-56D4-4B8A-9623-913B6846A106}.Release4.6|Any CPU.Build.0 = Release4.6|Any CPU
{5E5C0512-81BC-4C47-878C-89F723D1A589}.Debug|Any CPU.ActiveCfg = Release4.6|Any CPU
{5E5C0512-81BC-4C47-878C-89F723D1A589}.Debug|Any CPU.Build.0 = Release4.6|Any CPU
{5E5C0512-81BC-4C47-878C-89F723D1A589}.Release|Any CPU.ActiveCfg = Release4.6|Any CPU
{5E5C0512-81BC-4C47-878C-89F723D1A589}.Release|Any CPU.Build.0 = Release4.6|Any CPU
{5E5C0512-81BC-4C47-878C-89F723D1A589}.Release3.5|Any CPU.ActiveCfg = Release3.5|Any CPU
{5E5C0512-81BC-4C47-878C-89F723D1A589}.Release3.5|Any CPU.Build.0 = Release3.5|Any CPU
{5E5C0512-81BC-4C47-878C-89F723D1A589}.Release4.6|Any CPU.ActiveCfg = Release4.6|Any CPU
{5E5C0512-81BC-4C47-878C-89F723D1A589}.Release4.6|Any CPU.Build.0 = Release4.6|Any CPU
{3251CB2C-90A6-4EB2-9F39-5BD80FB032A0}.Debug|Any CPU.ActiveCfg = Release4.6|Any CPU
{3251CB2C-90A6-4EB2-9F39-5BD80FB032A0}.Debug|Any CPU.Build.0 = Release4.6|Any CPU
{3251CB2C-90A6-4EB2-9F39-5BD80FB032A0}.Release|Any CPU.ActiveCfg = Release4.6|Any CPU
{3251CB2C-90A6-4EB2-9F39-5BD80FB032A0}.Release|Any CPU.Build.0 = Release4.6|Any CPU
{3251CB2C-90A6-4EB2-9F39-5BD80FB032A0}.Release3.5|Any CPU.ActiveCfg = Release3.5|Any CPU
{3251CB2C-90A6-4EB2-9F39-5BD80FB032A0}.Release3.5|Any CPU.Build.0 = Release3.5|Any CPU
{3251CB2C-90A6-4EB2-9F39-5BD80FB032A0}.Release4.6|Any CPU.ActiveCfg = Release4.6|Any CPU
{3251CB2C-90A6-4EB2-9F39-5BD80FB032A0}.Release4.6|Any CPU.Build.0 = Release4.6|Any CPU
{C7FA2FB0-ACD3-4957-A653-979AFADC3145}.Debug|Any CPU.ActiveCfg = Release4.6|Any CPU
{C7FA2FB0-ACD3-4957-A653-979AFADC3145}.Debug|Any CPU.Build.0 = Release4.6|Any CPU
{C7FA2FB0-ACD3-4957-A653-979AFADC3145}.Release|Any CPU.ActiveCfg = Release4.6|Any CPU
{C7FA2FB0-ACD3-4957-A653-979AFADC3145}.Release|Any CPU.Build.0 = Release4.6|Any CPU
{C7FA2FB0-ACD3-4957-A653-979AFADC3145}.Release3.5|Any CPU.ActiveCfg = Release3.5|Any CPU
{C7FA2FB0-ACD3-4957-A653-979AFADC3145}.Release3.5|Any CPU.Build.0 = Release3.5|Any CPU
{C7FA2FB0-ACD3-4957-A653-979AFADC3145}.Release4.6|Any CPU.ActiveCfg = Release4.6|Any CPU
{C7FA2FB0-ACD3-4957-A653-979AFADC3145}.Release4.6|Any CPU.Build.0 = Release4.6|Any CPU
{3CE813EF-2925-41C5-B8BA-D8F2BE90058B}.Debug|Any CPU.ActiveCfg = Release4.6|Any CPU
{3CE813EF-2925-41C5-B8BA-D8F2BE90058B}.Debug|Any CPU.Build.0 = Release4.6|Any CPU
{3CE813EF-2925-41C5-B8BA-D8F2BE90058B}.Release|Any CPU.ActiveCfg = Release4.6|Any CPU
{3CE813EF-2925-41C5-B8BA-D8F2BE90058B}.Release|Any CPU.Build.0 = Release4.6|Any CPU
{3CE813EF-2925-41C5-B8BA-D8F2BE90058B}.Release3.5|Any CPU.ActiveCfg = Release3.5|Any CPU
{3CE813EF-2925-41C5-B8BA-D8F2BE90058B}.Release3.5|Any CPU.Build.0 = Release3.5|Any CPU
{3CE813EF-2925-41C5-B8BA-D8F2BE90058B}.Release4.6|Any CPU.ActiveCfg = Release4.6|Any CPU
{3CE813EF-2925-41C5-B8BA-D8F2BE90058B}.Release4.6|Any CPU.Build.0 = Release4.6|Any CPU
{33411767-CA47-4D3B-A82C-D77AB4C5FA97}.Debug|Any CPU.ActiveCfg = Release|Any CPU
{33411767-CA47-4D3B-A82C-D77AB4C5FA97}.Release|Any CPU.ActiveCfg = Release|Any CPU
{33411767-CA47-4D3B-A82C-D77AB4C5FA97}.Release3.5|Any CPU.ActiveCfg = Release|Any CPU
{33411767-CA47-4D3B-A82C-D77AB4C5FA97}.Release4.6|Any CPU.ActiveCfg = Release|Any CPU
{A2FDB1FB-E259-45C0-B46A-4E416110BBB3}.Debug|Any CPU.ActiveCfg = Release3.5|Any CPU
{A2FDB1FB-E259-45C0-B46A-4E416110BBB3}.Debug|Any CPU.Build.0 = Release3.5|Any CPU
{A2FDB1FB-E259-45C0-B46A-4E416110BBB3}.Release|Any CPU.ActiveCfg = Release3.5|Any CPU
{A2FDB1FB-E259-45C0-B46A-4E416110BBB3}.Release|Any CPU.Build.0 = Release3.5|Any CPU
{A2FDB1FB-E259-45C0-B46A-4E416110BBB3}.Release3.5|Any CPU.ActiveCfg = Release3.5|Any CPU
{A2FDB1FB-E259-45C0-B46A-4E416110BBB3}.Release3.5|Any CPU.Build.0 = Release3.5|Any CPU
{A2FDB1FB-E259-45C0-B46A-4E416110BBB3}.Release4.6|Any CPU.ActiveCfg = Release4.6|Any CPU
{A2FDB1FB-E259-45C0-B46A-4E416110BBB3}.Release4.6|Any CPU.Build.0 = Release4.6|Any CPU
{FCADD801-FF9E-46E5-A573-E06FA0C8661B}.Debug|Any CPU.ActiveCfg = Release3.5|Any CPU
{FCADD801-FF9E-46E5-A573-E06FA0C8661B}.Debug|Any CPU.Build.0 = Release3.5|Any CPU
{FCADD801-FF9E-46E5-A573-E06FA0C8661B}.Release|Any CPU.ActiveCfg = Release3.5|Any CPU
{FCADD801-FF9E-46E5-A573-E06FA0C8661B}.Release|Any CPU.Build.0 = Release3.5|Any CPU
{FCADD801-FF9E-46E5-A573-E06FA0C8661B}.Release3.5|Any CPU.ActiveCfg = Release3.5|Any CPU
{FCADD801-FF9E-46E5-A573-E06FA0C8661B}.Release3.5|Any CPU.Build.0 = Release3.5|Any CPU
{FCADD801-FF9E-46E5-A573-E06FA0C8661B}.Release4.6|Any CPU.ActiveCfg = Release4.6|Any CPU
{FCADD801-FF9E-46E5-A573-E06FA0C8661B}.Release4.6|Any CPU.Build.0 = Release4.6|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
GlobalSection(NestedProjects) = preSolution
{A48FB4F2-A962-4628-8F1E-35191B078F43} = {7D856461-F36E-4843-AA41-C908A2FA7E2C}
{63E0BE87-2979-4275-A37E-B7F8CBD365F9} = {0F6B5AB0-D090-41AF-9266-29998CC557E7}
{A92A0A22-56D4-4B8A-9623-913B6846A106} = {0F6B5AB0-D090-41AF-9266-29998CC557E7}
{5E5C0512-81BC-4C47-878C-89F723D1A589} = {0F6B5AB0-D090-41AF-9266-29998CC557E7}
{3251CB2C-90A6-4EB2-9F39-5BD80FB032A0} = {0F6B5AB0-D090-41AF-9266-29998CC557E7}
{C7FA2FB0-ACD3-4957-A653-979AFADC3145} = {F1756C9F-2895-479E-811A-6E7AA3086E57}
{3CE813EF-2925-41C5-B8BA-D8F2BE90058B} = {F1756C9F-2895-479E-811A-6E7AA3086E57}
{33411767-CA47-4D3B-A82C-D77AB4C5FA97} = {7D856461-F36E-4843-AA41-C908A2FA7E2C}
{A2FDB1FB-E259-45C0-B46A-4E416110BBB3} = {4C7742BC-F6EB-463D-BB44-2783BEC16520}
{FCADD801-FF9E-46E5-A573-E06FA0C8661B} = {4C7742BC-F6EB-463D-BB44-2783BEC16520}
EndGlobalSection
GlobalSection(ExtensibilityGlobals) = postSolution
SolutionGuid = {FBD3EB6F-0BDA-4218-8D0C-0756C8AFE605}
Expand Down
8 changes: 8 additions & 0 deletions src/Event Types.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
@Reality.Stop() Here goes for the type of events:

- Global Event: Is triggered to the event bus (EventBus.Trigger) on all handlers.
- Game Object Event: Is triggered through the event bus (EventBus.Trigger), but only on handlers where the EventHook's target matches. (Basically: "local" events)
- Manual Event: Will have to get triggered through TriggerEventHandler. Usually used for special cases & edit mode stuff like gizmos.
- Event (abstract): None of this is very well defined, so you can derive it to implement really customized events.

It's important to note that the event bus does not exist during edit mode, so if you need to run graph code then, you'll probably need Manual Event.
27 changes: 27 additions & 0 deletions src/Fundamentals/Bolt.Addons.Community.Fundamentals.Editor.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@
<Compile Include="Editor\Descriptors\StuffHappensDescriptor.cs" />
<Compile Include="Editor\Descriptors\CommentDescriptor.cs" />
<Compile Include="Editor\Descriptors\TodoDescriptor.cs" />
<Compile Include="Editor\Inspectors\BranchParamsInspector.cs" />
<Compile Include="Editor\Controls\UnitButton.cs" />
<Compile Include="Editor\Controls\UnitButtonAttribute.cs" />
<Compile Include="Editor\Controls\UnitButtonInspector.cs" />
<Compile Include="Editor\Controls\UnitButtonPropertyDrawer.cs" />
<Compile Include="Editor\Widgets\CommentUnitWidget.cs" />
<Compile Include="Editor\Descriptors\LogicParamsDescriptor.cs" />
<Compile Include="Editor\Descriptors\OnVariableChangedDescriptor.cs" />
Expand Down Expand Up @@ -95,6 +100,28 @@
<ItemGroup>
<EmbeddedResource Include="Resources\construction.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Branch_And.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Branch_Or.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Branch_Less.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Branch_Less_Equal.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Branch_Greater.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Branch_Greater_Equal.png" />
</ItemGroup>
<ItemGroup>
<EmbeddedResource Include="Resources\Branch_Equal.png" />
</ItemGroup>
<ItemGroup />
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\Bolt.PostBuild.targets" />
</Project>
9 changes: 8 additions & 1 deletion src/Fundamentals/Bolt.Addons.Community.Fundamentals.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,7 @@
<Compile Include="Units\Documenting\CommentUnit.cs" />
<Compile Include="Units\Documenting\StuffHappens.cs" />
<Compile Include="Units\Documenting\Todo.cs" />
<Compile Include="Units\FlowEvents\ManualEvent.cs" />
<Compile Include="Units\logic\Boolean\Between.cs" />
<Compile Include="Units\logic\Boolean\LogicParams.cs" />
<Compile Include="Units\logic\Boolean\Latch.cs" />
Expand Down Expand Up @@ -72,14 +73,20 @@
<Compile Include="Units\math\Functions\SigmoidFunctionOfRange.cs" />
<Compile Include="Units\math\MathParamNode.cs" />
<Compile Include="Units\math\RandomNumbers.cs" />
<Compile Include="Units\physics\OnParticleTriggerNode.cs" />
<Compile Include="Units\variables\DecrementUnit.cs" />
<Compile Include="Units\variables\IncrementUnit.cs" />
<Compile Include="Units\variables\OnVariableChanged.cs" />
<Compile Include="Units\variables\PlusEquals.cs" />
<Compile Include="Units\variables\VariableAdder.cs" />
<Compile Include="Units\VariadicNode.cs" />
</ItemGroup>
<ItemGroup />
<ItemGroup>
<ProjectReference Include="..\Utility\Bolt.Addons.Community.Utility.csproj">
<Project>{a2fdb1fb-e259-45c0-b46a-4e416110bbb3}</Project>
<Name>Bolt.Addons.Community.Utility</Name>
</ProjectReference>
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<Import Project="$(SolutionDir)\Bolt.PostBuild.targets" />
</Project>
10 changes: 10 additions & 0 deletions src/Fundamentals/Editor/Controls/UnitButton.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
using Ludiq;

namespace Bolt.Community.Addons.Fundamentals.Editor.Controls
{
[Inspectable]
public class UnitButton
{
public System.Action action;
}
}
18 changes: 18 additions & 0 deletions src/Fundamentals/Editor/Controls/UnitButtonAttribute.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

namespace Bolt.Community.Addons.Fundamentals.Editor.Controls
{
[AttributeUsage(AttributeTargets.Field | AttributeTargets.Property, AllowMultiple = false, Inherited = true)]
public class UnitButtonAttribute : Attribute
{
public string action;

public UnitButtonAttribute(string action)
{
this.action = action;
}
}
}
51 changes: 51 additions & 0 deletions src/Fundamentals/Editor/Controls/UnitButtonInspector.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Ludiq;
using System.Reflection;
using System;

namespace Bolt.Community.Addons.Fundamentals.Editor.Controls
{
[Inspector(typeof(UnitButton) )]
public class UnitButtonInspector : Inspector
{
public UnitButtonInspector(Metadata metadata) : base(metadata) { }

protected override float GetHeight(float width, GUIContent label)
{
return 16;
}

protected override void OnGUI(Rect position, GUIContent label)
{
BeginBlock(metadata, position, GUIContent.none);

var buttonPosition = new Rect(
position.x,
position.y,
position.width + 8,
16
);

if (GUI.Button(buttonPosition, "Trigger", new GUIStyle(UnityEditor.EditorStyles.miniButton)))
{
var attribute = metadata.GetAttribute<UnitButtonAttribute>(true);

if (attribute != null)
{
var method = attribute.action;

object typeObject = metadata.parent.value;
typeObject.GetType().GetMethod(method).Invoke(typeObject, new object[0] { });

}
}

if (EndBlock(metadata))
{
metadata.RecordUndo();
}
}
}
}
13 changes: 13 additions & 0 deletions src/Fundamentals/Editor/Controls/UnitButtonPropertyDrawer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEditor;

namespace Bolt.Community.Addons.Fundamentals.Editor.Controls
{
[CustomPropertyDrawer(typeof(UnitButton))]
public class UnitButtonPropertyDrawer : PropertyDrawer
{

}
}
Loading

0 comments on commit 3481581

Please sign in to comment.