我寫這篇文章的原因主要是因為我看到現今的抽卡系統不夠「公平」,故此略為研究一下到底如何使抽卡類系統能夠做得更理想。
一般而言,玩家都會覺得抽不抽到想要的卡均是「人品」作祟,經常抽到稀有品稱為「歐洲人」、抽不到的則是「非洲人」,因此下面在描述各系統的同時亦會探討一下如何更能反映「人品」。
| (function(root) { | |
| if(!root) root = {}; | |
| var nextID = 0, timers = []; | |
| root.setAutoAdjustInterval = function(callback, interval, timeKeeperFunc, frameTheshold) { | |
| if(!timeKeeperFunc || typeof timeKeeperFunc != "function") | |
| timeKeeperFunc = Date.now; | |
| if(!frameTheshold || typeof frameTheshold != "number") | |
| frameTheshold = 1000 / interval; | |
| var timeDiff, | |
| thisTS, |
| public static class TST { | |
| public static string TestToString() { | |
| return "ToString() test" | |
| .ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString() | |
| .ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString() | |
| .ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString() | |
| .ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString() | |
| .ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString().ToString() |
| using System; | |
| using System.Collections; | |
| using System.Collections.Generic; | |
| /// <summary> | |
| /// Contains muti dimensional iterators. | |
| /// </summary> | |
| public static class MultiDimenIterator { | |
| /// <summary> |
| using System; | |
| using UnityEditor; | |
| using UnityEngine; | |
| using System.Collections.Generic; | |
| using UnityObject = UnityEngine.Object; | |
| public static class SelectReferencesUtils { | |
| [MenuItem("Assets/Select Intances On Scene", false, 30)] | |
| static void SelectInstances() { | |
| Selection.objects = GetReferencesOfAsset(Selection.objects); |
| using System; | |
| using System.IO; | |
| using System.Collections.Generic; | |
| using System.Linq; | |
| using System.Globalization; | |
| using System.Text; | |
| using Microsoft.Xna.Framework; | |
| using Microsoft.Xna.Framework.Audio; | |
| using Microsoft.Xna.Framework.Graphics; |
| // Similar to eval(), but it is safe to be called in strict mode and will | |
| // run the code asynchronously (Nothing will be returned). | |
| // Available only in HTML5 DOM. | |
| function runScript(script) { | |
| if(!script) return; | |
| // Create a temporary blob that contains the script string and | |
| // add a script tag at the end of the document to contain that blob. | |
| var blob = new Blob([script.toString()], { type: 'text/javascript' }); | |
| var url = URL.createObjectURL(blob); |
| using System; | |
| using System.IO; | |
| using System.Diagnostics; | |
| using System.Reflection; | |
| namespace SelfDestruct { | |
| public class SelfDestructor { | |
| const string batScript = "@echo off\r\n" + | |
| ":trydelete\r\n" + | |
| "echo \"%~f1\">\"%~f1\"\r\n" + |
| @echo off | |
| echo "Self Expanding" | |
| type %~f0 >> %~f0 | |
| rem The empty line at the end is important, or it will not works |
| using UnityEngine; | |
| [ExecuteInEditMode, RequireComponent(typeof(Camera))] | |
| public class ColorMatrixCorrection: MonoBehaviour { | |
| public Matrix4x4 colorMatrix = Matrix4x4.identity; | |
| public Vector4 baseColor; | |
| private Material material; | |
| private void Awake() { | |
| material = new Material(Shader.Find("Hidden/ColorMatrixCorrection")); |
我寫這篇文章的原因主要是因為我看到現今的抽卡系統不夠「公平」,故此略為研究一下到底如何使抽卡類系統能夠做得更理想。
一般而言,玩家都會覺得抽不抽到想要的卡均是「人品」作祟,經常抽到稀有品稱為「歐洲人」、抽不到的則是「非洲人」,因此下面在描述各系統的同時亦會探討一下如何更能反映「人品」。