Forked from Volodymyr's Pen Heart.
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 class CycleBuffer | |
| { | |
| public static byte GetByte(byte[] buffer, int index) { | |
| int size = buffer.Length; | |
| return buffer[(index % size + size) % size]; | |
| } | |
| } |
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 UnityEngine; | |
| using System.Collections.Generic; | |
| using UnityEditor; | |
| using System.Text.RegularExpressions; | |
| using System.IO; | |
| using System.Text; | |
| public class ReimportUnityEngineUI | |
| { | |
| [MenuItem( "Assets/Reimport UI Assemblies", false, 100 )] |
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 UnityEngine; | |
| using UnityEngine.UI; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| public class CircleText : BaseVertexEffect | |
| { | |
| public int radius = 50; | |
| public float spaceCoff = 1f; |
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
| function class(super) | |
| local cls | |
| if super == nil then | |
| -- table with a dumb ctor | |
| cls = { ctor = function() end } | |
| else | |
| cls = setmetatable({}, super) | |
| cls.super = super | |
| end |
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
| function isa(instance, Class) | |
| local metatable = getmetatable(instance) | |
| while metatable ~= nil do | |
| if metatable == Class then | |
| return true | |
| else | |
| metatable = getmetatable(metatable) | |
| end | |
| end |
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
| -- would not handle userdata, function, thread | |
| function clone(object) | |
| local lookup_table = {} | |
| local function _copy(object) | |
| if type(object) ~= "table" then | |
| return object | |
| elseif lookup_table[object] then | |
| return lookup_table[object] | |
| end | |
| local new_table = {} |
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
| var ExpTable = function () { | |
| this.table = []; | |
| }; | |
| ExpTable.prototype.addRow = function (row) { | |
| this.table.push(row); | |
| }; | |
| ExpTable.prototype.getConfigFromExp = function(total_exp) { | |
| var row; |
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
| /** | |
| * @return {string} | |
| */ | |
| S4 = function () { | |
| return (((1 + Math.random()) * 0x10000) | 0).toString(16).substring(1); | |
| }; | |
| /** | |
| * @return {string} |
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
| uiReader = ccs.uiReader.widgetFromJsonFile.bind(ccs.uiReader); | |
| getWidget = ccui.helper.seekWidgetByName.bind(ccui.helper); | |
| on = cc.eventManager.addCustomListener.bind(cc.eventManager); | |
| off = cc.eventManager.removeCustomListeners.bind(cc.eventManager); | |
| send = cc.eventManager.dispatchCustomEvent.bind(cc.eventManager); |