View AIController.cs
using System.Collections.Generic; | |
using UnityEngine; | |
namespace UGPXFramework { | |
public class AIController { | |
private DynamicBlackboard _blackboard = new DynamicBlackboard(); | |
private List<IAIScan> _scans = new List<IAIScan>(); | |
private List<IAIAction> _actions = new List<IAIAction>(); | |
public AIController(GameObject gameObject) { |
View patterns.js
// PATTERN | |
// avoid popup blocker when you need async code when opening new tab\ | |
// NOTE: the downside to this approach it the the user will see a blank page until the async method finished but instead of opening | |
// NOTE: to a blank page, you could probably have a redirect page that has animation or something | |
//first have a method that does the async functionality and get passed in the new tab window | |
const doRedirect = async (newWindow) => { | |
try { | |
const redirectUrl = await api.getRedirectUrl(); |
View examples.cpp
// @example scrolling example | |
case SDL_MOUSEMOTION: | |
{ | |
bool mouseInUiNow = isInRect(sideUiBackground, event.motion.x, event.motion.y); | |
if (mouseInUiNow && !mouseInUi) { | |
mouseInUi = true; | |
} else if (!mouseInUiNow && mouseInUi) { | |
mouseInUi = false; | |
} |
View .gitignore
/[Ll]ibrary/ | |
/[Tt]emp/ | |
/[Oo]bj/ | |
/[Bb]uild/ | |
/[Bb]uilds/ | |
# Exclude 3rd party libraries installed from the assets store | |
[Aa]ssets/Asset Store Resources/ | |
# Some asset tools can't be moved so need to explicitly |
View .editorconfig
# editorconfig.org | |
root = true | |
[*] | |
indent_style = space | |
indent_size = 2 | |
end_of_line = lf | |
charset = utf-8 | |
trim_trailing_whitespace = true | |
insert_final_newline = true |