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; | |
public class CachedMB : MonoBehaviour | |
{ | |
Transform _transform; | |
public Transform transform |
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 Update() | |
{ | |
if(Input.GetMouseButtonDown(0)) | |
{ | |
float hitDist = Mathf.Infinity; | |
Ray ray = Camera.main.ScreenPointToRay(Input.MousePosition); | |
RaycastHit hit; | |
if(Physics.RayCast(ray, out hit, hitDist)) | |
{ |
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 System; | |
using System.Collections.Generic; | |
using System.Linq; | |
namespace NumberToWords | |
{ | |
class Program | |
{ | |
private static Dictionary<int, char[]> charDict = new Dictionary<int, char[]>() { | |
{2, new char[] { 'a','b','c'}}, |
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; | |
public class ClickTerrain : MonoBehaviour | |
{ | |
void Start() | |
{ | |
var terrain = Terrain.activeTerrain; | |
var td = terrain.terrainData; | |
var resX = td.heightmapWidth; |
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
Commands | |
/raffle [duration] [OPTIONAL:maxEntries] ["item1:amount"] ["item2:amount"] ... ["itemN:amount] [OPTIONAL:"password"] | |
Starts a new raffle | |
Unlimited item arguments | |
Without arguments, a raffle will have a duration of 20 seconds with unlimited entries and no prizes | |
Available to users with the canRaffle flag, canRaffleAdmin flag, and server admins. | |
/joinraffle ["playerName"] [OPTIONAL:"password"] |
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
PLUGIN.Title = "Raffle" | |
PLUGIN.Description = "Raffle off your items and money" | |
PLUGIN.Author = "Limyc" | |
PLUGIN.Version = 1.10 | |
local function split(str, delimiter) | |
result = {} | |
if delimiter == nil then | |
delimiter = "%s" | |
end |
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
for (int i = 1; i <= 100; i++) Console.WriteLine("{0:#;}{1:;;Fizz}{2:;;Buzz}", i % 3 * i % 5 == 0 ? 0 : i, i % 3, i % 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
public interface IRequirement | |
{ | |
bool IsComplete {get; set;} | |
void OnRequirementEvent(IRequirementArgs args); | |
} |