https://github.com/kuritaro1122/functionexecuter
[Unity] GameObjectに簡単に命令を付与するプログラム
https://github.com/kuritaro1122/functionexecuter
csharp unity unity-scripts
Last synced: about 2 months ago
JSON representation
[Unity] GameObjectに簡単に命令を付与するプログラム
- Host: GitHub
- URL: https://github.com/kuritaro1122/functionexecuter
- Owner: kuritaro1122
- License: mit
- Created: 2021-09-26T00:38:25.000Z (almost 5 years ago)
- Default Branch: main
- Last Pushed: 2022-04-10T07:59:45.000Z (about 4 years ago)
- Last Synced: 2025-07-12T01:35:54.603Z (12 months ago)
- Topics: csharp, unity, unity-scripts
- Language: C#
- Homepage:
- Size: 46.9 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
[FunctionExecutor_Nodeはこちら](/README_node.md)
# FunctionExecutor
GameObjectに命令を付与し、非同期的に逐次実行する。\
[EntityActionCon](https://github.com/kuritaro1122/EntityActionCon)の基底プログラムです。
# Requirement
* UnityEngine
* System
* System.Collections
# Usage
```
GameObject target;
FunctionExecutor executor = target.ComponentFunctionExecutor(); //Add or GetComponent
executor.Set(
// Write the function you want to execute.
// new FE_Function1(),
// new FE_Function2(),
// ...
).BeginAction();
```
## FE_Functions
```
F_WaitForSeconds(float time)
F_WaitUntil(System.Func condition)
F_Destroy(GameObject gameObject = null)
F_DebugLog(string message)
F_Action(System.Action action)
F_Action(System.Action action)
F_Coroutine(bool asyn, System.Func enumerator)
F_Coroutine(bool asyn, System.Func enumerator)
F_ChainFunction(bool asyn, params FE_IFunction[] functions)
F_LoopFunction(bool asyn, Func condition, params FE_IFunction[] functions)
F_LoopFunction(bool asyn, int count, params FE_IFunction[] functions)
F_LoopFunction(bool asyn, Func condition, int count, bool and, params FE_IFunction[] functions)
```
## FE_IFunction (Interface)
```
IEnumerator IGetFunction(IFunctionExecutor executor)
bool IGetAsyn()
```
# Contains
## Public Variable
```
bool Running { get; }
```
## Public Function
```
FunctionExecutor Set(params FE_IFunction[] functions)
FunctionExecutor ResetAll()
Coroutine BeginAction()
```
# Note
* bool asynをtrueにすると、前の命令の終了を待たずに実行されます。
* 新たな命令を追加したい場合には、F_ActionやF_Coroutineを使うか、FE_IFunctionを継承したクラスを作ってください。
# License
"FunctionExecutor" is under [MIT license](https://en.wikipedia.org/wiki/MIT_License).