Comments (6)
Connected PR hits most of this. I'll cross reference the code you posted when I run through it.
from fluid-behavior-tree.
Great first issue if somebody wants to tackle it.
from fluid-behavior-tree.
any update on this? the PR seems stalled..
from fluid-behavior-tree.
Haven't touched any AI for a while so I've been working on other libraries. Somebody pushed up a PR to get this going but it still needs some work.
from fluid-behavior-tree.
Issue is mostly done here. Needs some cleanup to be finished #69
from fluid-behavior-tree.
In order to make dark mode easily visible I changed the colors of the NodeFaders based on whether the dark mode is on or not.
using UnityEditor;
using UnityEngine;
namespace CleverCrow.Fluid.BTs.Trees.Editors {
public class NodeFaders {
public ColorFader BackgroundFader { get; } = new ColorFader(
EditorGUIUtility.isProSkin ?
new Color(0, 0f, 0.8f) : new Color(0.65f, 0.65f, 0.65f),
EditorGUIUtility.isProSkin ?
new Color(0f, 1f, 0f) : new Color(0.39f, 0.78f, 0.39f));
public ColorFader TextFader { get; } = new ColorFader(
EditorGUIUtility.isProSkin ?
Color.black : Color.white,
EditorGUIUtility.isProSkin ?
Color.white : Color.black);
public ColorFader MainIconFader { get; } = new ColorFader(
new Color(1, 1, 1, 0.3f), new Color(1, 1, 1, 1f));
public ColorFader LastStatusFader { get; } = new ColorFader(
Color.grey, Color.white);
public void Update (bool active) {
BackgroundFader.Update(active);
TextFader.Update(active);
MainIconFader.Update(active);
LastStatusFader.Update(active);
}
}
}
I made the StatusIcons saturated and managed their darkness through code (they were really dark which didn't fit for dark mode):
Finally, because the last task status overlaps with the names of tasks if the text is long, I put the task status at the top right of the nodes.
public class NodePrintController {
private void PrintLastStatus (Rect rect) {
const float sidePadding = 1.5f;
var icon = BehaviorTreePrinter.StatusIcons.GetIcon(_node.Task.LastStatus);
icon.Paint(
new Rect(
rect.x + rect.size.x - icon.Texture.width - sidePadding,
// rect.y + rect.size.y - icon.Texture.height - sidePadding, // original code
rect.y, // new code
icon.Texture.width, icon.Texture.height),
_faders.LastStatusFader.CurrentColor);
}
}
from fluid-behavior-tree.
Related Issues (20)
- Error every frame due to condition in spliced tree HOT 6
- Test files should not be pulled into builds HOT 16
- Repeat Tasks - Not functioning as expected HOT 2
- Minor editor rendering glitch HOT 2
- package.json conflicts when adding to OpenUPM HOT 10
- CallStack incorrectly tagged in contributors
- Semantic Release is not updating the `master` branch version HOT 15
- Wrong method invocation in base class ActionGeneric.cs HOT 7
- The automated release is failing 🚨 HOT 1
- Contribution Guidelines
- Visualization is not available at all! HOT 1
- Inject tree in existing tree during runtime HOT 2
- ConditionGeneric: initLogic/exitLogic invoked back-to-front HOT 3
- share code with server HOT 2
- TimeMonitor only works if Tick is called every frame HOT 7
- PATH_PROJECT in AssetPath describes a folder that never exists
- Decorated TaskBase does not invoke RemoveActiveTask. HOT 2
- Logic mislead in TaskParentBase HOT 2
- BT window shows all tasks as inactive when EditorApplication.isPaused HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fluid-behavior-tree.