-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Move Assets/Editor to Assets/Maroon/Editor
- Loading branch information
1 parent
4ba9198
commit 8c75db5
Showing
14 changed files
with
492 additions
and
526 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
68 changes: 34 additions & 34 deletions
68
unity/Assets/Editor/ButtonAction.cs → unity/Assets/Maroon/Editor/ButtonAction.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,34 +1,34 @@ | ||
using UnityEngine; | ||
|
||
[System.Serializable] | ||
public class ButtonAction<T> | ||
{ | ||
// public settings | ||
public Object target; | ||
public string method; | ||
|
||
// inspactor cache | ||
public string[] candidates = { }; | ||
public int index; | ||
|
||
// invocation | ||
public System.Action<T> action; | ||
|
||
public void Awake() | ||
{ | ||
action = System.Action<T>.CreateDelegate(typeof(System.Action<T>), target, target.GetType().GetMethod(method)) as System.Action<T>; | ||
} | ||
} | ||
|
||
public class ButtonActionAttribute : PropertyAttribute | ||
{ | ||
public System.Type returnType; | ||
public System.Type[] paramTypes; | ||
public ButtonActionAttribute(System.Type returnType = null, params System.Type[] paramTypes) | ||
{ | ||
this.returnType = returnType != null ? returnType : typeof(void); | ||
this.paramTypes = paramTypes != null ? paramTypes : new System.Type[0]; | ||
} | ||
|
||
public System.Delegate method; | ||
} | ||
using UnityEngine; | ||
|
||
[System.Serializable] | ||
public class ButtonAction<T> | ||
{ | ||
// public settings | ||
public Object target; | ||
public string method; | ||
|
||
// inspactor cache | ||
public string[] candidates = { }; | ||
public int index; | ||
|
||
// invocation | ||
public System.Action<T> action; | ||
|
||
public void Awake() | ||
{ | ||
action = System.Action<T>.CreateDelegate(typeof(System.Action<T>), target, target.GetType().GetMethod(method)) as System.Action<T>; | ||
} | ||
} | ||
|
||
public class ButtonActionAttribute : PropertyAttribute | ||
{ | ||
public System.Type returnType; | ||
public System.Type[] paramTypes; | ||
public ButtonActionAttribute(System.Type returnType = null, params System.Type[] paramTypes) | ||
{ | ||
this.returnType = returnType != null ? returnType : typeof(void); | ||
this.paramTypes = paramTypes != null ? paramTypes : new System.Type[0]; | ||
} | ||
|
||
public System.Delegate method; | ||
} |
24 changes: 12 additions & 12 deletions
24
unity/Assets/Editor/ButtonAction.cs.meta → ...Assets/Maroon/Editor/ButtonAction.cs.meta
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.