Skip to content

Instantly share code, notes, and snippets.

View forcepusher's full-sized avatar

Anton forcepusher

View GitHub Profile
@forcepusher
forcepusher / link.xml
Created June 7, 2023 11:49
link.xml for Behavior Designer to work with High Managed Stripping Level
@forcepusher
forcepusher / Program.cs
Last active May 14, 2023 13:41
Unity "void Main" OOP template
using System.Diagnostics;
using System.Threading.Tasks;
using UnityEngine;
using UnityEngine.SceneManagement;
namespace BananaParty.FurryGame.Client
{
/// <summary>
/// Entry point for wiring up the engine and executing main loop.
/// </summary>
@forcepusher
forcepusher / WebEventSystem.cs
Created November 30, 2021 09:54
UnityEngine.EventSystem bug workaround for for YandexGames.
using UnityEngine.EventSystems;
/// <summary>
/// Workaround for EventSystem bug https://trello.com/c/PjW4j3st
/// </summary>
public class WebEventSystem : EventSystem
{
protected override void OnApplicationFocus(bool hasFocus) => base.OnApplicationFocus(true);
}
@forcepusher
forcepusher / KeyboardKey.ts
Last active May 15, 2021 15:42
Complete KeyboardEvent.code enum.
// Painstakingly copied by hand from https://w3c.github.io/uievents-code/
/**
* To convert from keyboardEvent.code string to KeyboardKey enum use this:
* @example KeyboardKey[keyboardEvent.code as keyof typeof KeyboardKey];
*/
enum KeyboardKey {
// Writing system keys.
Backquote,
Backslash,
@forcepusher
forcepusher / .eslintrc.json
Last active August 23, 2022 16:14
Very opinionated Airbnb ESLint config for AssemblyScript.
// Lights up your code like a Christmas tree, but eliminates bikeshedding.
// Don't forget to use `"strict": true` option in the root tsconfig.json
// You can also enable the `"pedantic": true` option in asconfig.json
// Dependencies:
// "eslint",
// "eslint-config-airbnb-base",
// "eslint-config-airbnb-typescript",
// "eslint-plugin-import",
// "@typescript-eslint/parser",
// "@typescript-eslint/eslint-plugin",