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; | |
| public class Flicker : MonoBehaviour | |
| { | |
| public string LightStyle = "mmamammmmammamamaaamammma"; | |
| private Light light; | |
| public float loopTime = 2f; | |
| [SerializeField] | |
| private int currentIndex = 0; |
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
| <!DOCTYPE html> | |
| <html lang="zh-CN"> | |
| <head> | |
| <meta charset="UTF-8"> | |
| <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no"> | |
| <title>贪吃蛇大冒险 🐍</title> | |
| <style> | |
| * { margin: 0; padding: 0; box-sizing: border-box; -webkit-tap-highlight-color: transparent; } | |
| body { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; background: linear-gradient(135deg, #1a1a2e 0%, #16213e 50%, #0f3460 100%); font-family: 'Segoe UI', sans-serif; color: #fff; padding: 10px; overflow: hidden; } | |
| h1 { font-size: 1.5rem; margin-bottom: 10px; text-shadow: 0 0 15px rgba(0, 255, 136, 0.5); } |
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
| /* | |
| * AStarfinding | |
| * | |
| * local path_find = require "pathfinding" | |
| * | |
| * local function neighbors(add, x, y, dist) | |
| * add(x+1, y, hint, 1) | |
| * end | |
| * | |
| * local r = path_find(sx, sy, tx, ty, neighbors) |
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; | |
| namespace WeddingMovie | |
| { | |
| public class ColorChanger : MonoBehaviour | |
| { | |
| public Color color = Color.white; | |
| [ContextMenu("ChangeColor")] |
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 System.Collections.Generic; | |
| using System.Text.RegularExpressions; | |
| /* | |
| http://forum.unity3d.com/threads/adjustable-character-spacing-free-script.288277/ | |
| Unity 5.4 compatible version | |
| Produces an simple tracking/letter-spacing effect on UI Text components. | |
| Set the spacing parameter to adjust letter spacing. |
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.IO; | |
| using UnityEditor; | |
| using UnityEngine; | |
| namespace UnityLibrary | |
| { | |
| [CustomEditor(typeof(SceneAsset))] | |
| public class CustomThumbnail : Editor | |
| { | |
| public override bool HasPreviewGUI() => true; |
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; | |
| [ExecuteInEditMode] | |
| public class CameraFollow : MonoBehaviour | |
| { | |
| [Tooltip( "Object to follow" )] | |
| public Transform Target; | |
| [Tooltip( "Target distance to the followed object" )] | |
| public Vector3 DistanceToTarget = new Vector3( 0f, 3f, -5f ); |
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
| #define ENABLE_LOGGING // Logs the folder objects that were flattened to the console | |
| //#define SIMULATE_BUILD_BEHAVIOUR_ON_PLAY_MODE // Simulates Execution.AtBuildTime when entering Play Mode in the Editor, as well | |
| #if UNITY_EDITOR | |
| using UnityEditor; | |
| using UnityEditor.Callbacks; | |
| using UnityEngine.SceneManagement; | |
| using System.Collections.Generic; | |
| using System.Reflection; | |
| #endif |
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
| #define COMPARE_FILE_CONTENTS | |
| #if COMPARE_FILE_CONTENTS | |
| #define USE_THREADS | |
| #endif | |
| using System; | |
| using System.Collections.Generic; | |
| using System.IO; | |
| #if USE_THREADS | |
| using System.Threading; |
NewerOlder