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
using UnityEngine; | |
using UnityEngine.UI; | |
using UnityEngine.Sprites; | |
using System; | |
using System.Collections.Generic; | |
public class DrawPolygon : Graphic | |
{ | |
[SerializeField] |
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
Shader "UI/Effect/Blur" { | |
Properties { | |
_Color ("Main Color", Color) = (1,1,1,1) | |
_BumpAmt ("Distortion", Range (0,128)) = 10 | |
_MainTex ("Tint Color (RGB)", 2D) = "white" {} | |
_BumpMap ("Normalmap", 2D) = "bump" {} | |
_Size ("Size", Range(0, 20)) = 1 | |
} | |
Category { |
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
Shader "UI/X5LCFD/Glint" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex("Sprite Texture", 2D) = "white" {} | |
_Color("Tint", Color) = (1,1,1,1) | |
[MaterialToggle] PixelSnap("Pixel snap", Float) = 0 | |
_ShineLocation("ShineLocation", Range(0,1)) = 0 | |
_ShineWidth("ShineWidth", Range(0,1)) = 0 | |
} |
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
void delete_node ( struct node** head, elem_type x ) | |
{ | |
for ( struct node** curr = head; *curr; ) | |
{ | |
struct node* entry = *curr; | |
if ( entry->elem == x ) { | |
*curr = entry->next; | |
free ( entry ); | |
} else { | |
curr = &entry->next; |
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
using UnityEngine; | |
using UnityEditor; | |
using System.IO; | |
using System.Xml; | |
using System; | |
public class BitmapFontExporter : ScriptableWizard | |
{ | |
[MenuItem ( "BitmapFontExporter/Create" )] | |
private static void CreateFont () |
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
using UnityEngine; | |
using System.Collections; | |
namespace UnityEngine.UI | |
{ | |
public class Empty4Raycast : MaskableGraphic | |
{ | |
protected Empty4Raycast() | |
{ | |
useLegacyMeshGeneration = false; |
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
/* * * * * * * * * * * * * * | |
* A simple expression parser | |
* -------------------------- | |
* | |
* The parser can parse a mathematical expression into a simple custom | |
* expression tree. It can recognise methods and fields/contants which | |
* are user extensible. It can also contain expression parameters which | |
* are registrated automatically. An expression tree can be "converted" | |
* into a delegate. | |
* |
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
/* Compile & Run: | |
clang++ -std=c++11 -fsanitize=address `freetype-config --cflags` `icu-config --cflags | sed -e 's/-std=c99//g' | sed -e 's/-O2//g'` -o freetype_test freetype_test.cpp `freetype-config --libs` `icu-config --ldflags` -lopencv_core -lopencv_highgui && ASAN_OPTIONS="detect_leaks=1" ./freetype_test | |
*/ | |
// Change the following to suit your need. | |
static const char *FONT_FILE = "/usr/share/fonts/truetype/wqy/wqy-microhei.ttc"; | |
static const char *STR = u8"哈哈abcdefghijklmnopqrstuvwxyz1234567890"; | |
static const int PIXEL_SIZE = 32, COLOR_BLUE = 255, COLOR_GREEN = 255, COLOR_RED = 0; | |
#include <cstdio> |
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
Shader "Sprites/SpriteShadows" | |
{ | |
Properties | |
{ | |
[PerRendererData] _MainTex ("Sprite Texture", 2D) = "white" {} | |
_Color ("Tint", Color) = (1,1,1,1) | |
_Cutoff ("Shadow alpha cutoff", Range(0,1)) = 0.5 | |
_Intensity("Shadow Intensity", Range(0,1)) = 0.5 | |
} | |
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
/****************************************************************************** | |
* Spine Runtimes Software License | |
* Version 2.3 | |
* | |
* Copyright (c) 2013-2015, Esoteric Software | |
* All rights reserved. | |
* | |
* You are granted a perpetual, non-exclusive, non-sublicensable and | |
* non-transferable license to use, install, execute and perform the Spine | |
* Runtimes Software (the "Software") and derivative works solely for personal |