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
| { | |
| "$schema": "https://raw.githubusercontent.com/JanDeDobbeleer/oh-my-posh/main/themes/schema.json", | |
| "version": 2, | |
| "blocks": [ | |
| { | |
| "type": "prompt", | |
| "alignment": "left", | |
| "segments": [ | |
| { |
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
| // http://help.adobe.com/en_US/FlashPlatform/reference/actionscript/3/package.html#encodeURIComponent() | |
| void hexchar(unsigned char c, unsigned char &hex1, unsigned char &hex2) | |
| { | |
| hex1 = c / 16; | |
| hex2 = c % 16; | |
| hex1 += hex1 <= 9 ? '0' : 'a' - 10; | |
| hex2 += hex2 <= 9 ? '0' : 'a' - 10; |
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
| #!/usr/bin/python | |
| # encoding=utf-8 | |
| # api | |
| # https://www.qcloud.com/document/product/275/6101 | |
| import httplib, urllib | |
| import json | |
| import time | |
| import base64 |
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
| local latency = 0 | |
| local ServerTime = { | |
| localTime = os.time(), | |
| serverTime = os.time(), | |
| -- 服务器时间-客户端时间 | |
| } | |
| function ServerTime.setServerTime(time) | |
| latency = time - os.time() | |
| -- localTime = os.time() |
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.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| // https://rhetty.github.io/2018/03/20/三角形线性插值——重心坐标/ | |
| // https://zh.wikipedia.org/wiki/笛卡尔坐标系 | |
| // https://en.wikipedia.org/wiki/Barycentric_coordinate_system | |
| public struct BarycentricCoordinates | |
| { |
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.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine.UI; | |
| public class TouchArea : Graphic | |
| { | |
| protected override void OnEnable() | |
| { | |
| base.OnEnable(); |
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
| // https://blog.csdn.net/mobilebbki399/article/details/50603461 | |
| float3 RGB2HSV(float3 c) | |
| { | |
| float4 K = float4(0.0, -1.0 / 3.0, 2.0 / 3.0, -1.0); | |
| float4 p = lerp(float4(c.bg, K.wz), float4(c.gb, K.xy), step(c.b, c.g)); | |
| float4 q = lerp(float4(p.xyw, c.r), float4(c.r, p.yzx), step(p.x, c.r)); | |
| float d = q.x - min(q.w, q.y); |
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.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| using UnityEngine.EventSystems; | |
| using UnityEngine.UI; | |
| [AddComponentMenu("Layout/Content Size By Parent", 143)] | |
| [ExecuteInEditMode] | |
| [RequireComponent(typeof(RectTransform))] |
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; | |
| using UnityEditor; | |
| [CustomEditor (typeof(TriggerContainer))] | |
| public class TriggerContainerEditor : Editor | |
| { | |
| private SerializedObject obj; |
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.Collections; | |
| using System.Collections.Generic; | |
| using UnityEngine; | |
| public class BillBoard2D : MonoBehaviour { | |
| public Camera m_Camera; | |
| void Update() | |
| { |
NewerOlder