internal static void AddCustomHotkeys(ref ToolInputCombos __result, char scheme) { foreach (Type toolType in TypeExportManager.GetTypesOfType(typeof(LevelEditorTool))) { LevelEditorTool instance = Activator.CreateInstance(toolType) as LevelEditorTool; if (toolType.HasAttribute <EditorToolAttribute>() && toolType.GetAttribute(out KeyboardShortcutAttribute attribute, false)) { __result.Add(attribute.Get(scheme).ToString(), instance.Info_.Name_); } } }
private void OnEnable() { _target = (ArkanoidManager)target; InitEditorProperties(); _target.Bricks.ClearChildrens(); _paintTool = new LevelEditorTool(_target); _edit = EditorPrefs.GetBool("_edit", false); if (_edit) { SceneView.onSceneGUIDelegate += HandleMouseEvents; } }
internal static void AddCustomHotkeys(ref ToolInputCombos __result, char scheme) { foreach (Type tooltype in Utils.Common.GetExportedTypesOfType(typeof(LevelEditorTool))) { LevelEditorTool instance = Activator.CreateInstance(tooltype) as LevelEditorTool; foreach (var attribute in tooltype.GetCustomAttributes(true)) { switch (attribute) { case ToolKeyboardShortcutAttribute input: __result.Add(input.Get(scheme).ToString(), instance.Info_.Name_); break; } } } }