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
// https://day.js.org/docs/en/display/format | |
import dayjs, {OpUnitType} from "dayjs"; | |
import relativeTime from "dayjs/plugin/relativeTime"; | |
import utc from "dayjs/plugin/utc"; | |
import weekOfYear from "dayjs/plugin/weekOfYear"; | |
dayjs.extend(utc); | |
dayjs.extend(weekOfYear); | |
dayjs.extend(relativeTime); |
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
class DecayTween{ | |
constructor({currentValue = 1, targetValue = 1, scaleFactor = 0.2, decayFactor = 0} = {}){ | |
this.currentValue = currentValue; | |
this.targetValue = targetValue; | |
this.scaleFactor = scaleFactor; | |
this.decayFactor = decayFactor; | |
this.decay = 0; | |
} | |
update(){ |
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 FpsMono : MonoBehaviour | |
{ | |
private float[] _deltaTimes = new float [600]; | |
private int _deltaTimeIndex = 0; | |
// Update is called once per frame | |
void Update() | |
{ |
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 class MyMono: MonoBehaviour { | |
[SelectAsset(SelectFileType.GameObject, "Assets/", "collider", ".wav|.prefab")] | |
public string MyPrefab; | |
[SelectAsset(SelectFileType.AudioClip, "Assets/Resources/BGM/", "", ".wav|.mp3")] | |
public string MyAudioClip; | |
} |
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; | |
using System.Collections.Generic; | |
using NUnit.Framework; | |
using UnityEngine; | |
using UnityEngine.Networking; | |
using UnityEngine.TestTools; | |
namespace Tests | |
{ |
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
// import {SocketClient} from "./SocketClient"; | |
// const client: SocketClient = new SocketClient("http://127.0.0.1", "userId=1"); | |
import Debug from "debug"; | |
import {EventEmitter} from "events"; | |
import * as SocketIOClient from "socket.io-client"; | |
const debug = Debug("app:SocketClient"); | |
export class SocketClient extends EventEmitter { |
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
//import {SocketServer} from "./SocketServer"; | |
//const server: SocketServer = new SocketServer(); | |
//server.start(); | |
import Debug from "debug"; | |
import {EventEmitter} from "events"; | |
import * as Http from "http"; | |
import * as SocketIo from "socket.io"; |
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
{ | |
"defaultSeverity": "error", | |
"extends": [ | |
"tslint:recommended" | |
], | |
"jsRules": {}, | |
"rules": { | |
"semicolon": [true, "always"], | |
"no-trailing-whitespace": false, | |
"arrow-parens": false, |