This file contains hidden or 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
using System; | |
using Sirenix.OdinInspector.Editor; | |
using Sirenix.Utilities.Editor; | |
using UnityEditor; | |
using UnityEngine; | |
using Random = System.Random; | |
/// <summary> | |
/// Draw the properties with a darker background and | |
/// borders, optionally. |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Reflection; | |
using Sirenix.OdinInspector; | |
using Sirenix.Utilities; | |
using UnityEngine; | |
#if UNITY_EDITOR | |
using Sirenix.OdinInspector.Editor; | |
using Sirenix.Utilities.Editor; |
This file contains hidden or 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
using System; | |
using System.Collections.Generic; | |
using Sirenix.OdinInspector.Editor; | |
using Sirenix.OdinInspector.Editor.Validation; | |
using Sirenix.Utilities.Editor; | |
using UnityEngine; | |
[DrawerPriority(0.0, 10000.1)] | |
public class MiniValidationDrawer<T> : OdinValueDrawer<T>, IDisposable | |
{ |
This file contains hidden or 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
#if UNITY_EDITOR | |
using System; | |
using System.Linq; | |
using OdinExtensions; | |
using Sirenix.OdinInspector.Editor; | |
using Sirenix.OdinInspector.Editor.Validation; | |
using Sirenix.Serialization; | |
using UnityEngine; | |
using Object = UnityEngine.Object; |
This file contains hidden or 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
public Vector3 GetPointClosestTo(Vector3 p, out float result, out int curve) { | |
// an optimized algorithm i invented which finds the closest point on a bezier to another arbitrary P point | |
// this algorithm is iteration based, meaning that the more iterations your perform, the more precise the results will be | |
// it is optimized to be fast but this particular implemention is not necessarily as fast as it could be, and the code is certainly not pretty | |
// optimizing this is left as an exercise to the viewer | |
// points is a vector3 array which defines the anchors and control points of the current bezier curve in the following format | |
// [anchor, control, control] * n, [anchor] | |
// where n is as many bezier curves which this spline defines. it pieces multiple bezier curves together, although the algorithm could be adapted for single curves that are alone |
This file contains hidden or 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
//groovy maplestory npc DSL example | |
//the parameter is npc id | |
def npc = new NpcBuilder(1337) | |
npc { | |
next "Yo what's up ?!?" | |
next "I'm pretty good how bout u??" | |
next_player "Yea bro im good here" | |
selections ["yo try this puzzle \r\n\r\nwhich 1 is not a cabbage???", [ |
This file contains hidden or 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
/* | |
This file is part of the OdinMS Maple Story Server | |
Copyright (C) 2008 Patrick Huy <[email protected]> | |
Matthias Butz <[email protected]> | |
Jan Christian Meyer <[email protected]> | |
This program is free software: you can redistribute it and/or modify | |
it under the terms of the GNU Affero General Public License as |