Skip to content

Instantly share code, notes, and snippets.

using System;
using UnityEngine;
public class TimerCountdown {
/// <summary>
/// Creates a timer which will return true every x seconds. Usage example in a MonoBehaviour:
///
/// private Func<bool> onTimerRestart = TimerCountDown.newTimeCounter(0.1f); // fire every 100ms
/// ...
/// void Update() {
@simon-heinen
simon-heinen / IntentFilterActivity.java
Created March 21, 2016 20:43
A generic intent filter activtiy which can send intents into Unity. Uses a few tricks to stay generic and not specify any project specific names
package com.bitstars.unity.intentfilter;
import android.app.Activity;
import android.content.Intent;
import android.os.AsyncTask;
import android.os.Bundle;
import android.util.Log;
import com.unity3d.player.UnityPlayer;
feat: add hat wobble
^--^ ^------------^
| |
| +-> Summary in present tense.
|
+-------> Type: chore, docs, feat, fix, refactor, style, or test.
@simon-heinen
simon-heinen / shake.xml
Last active September 25, 2023 17:13
A simple shake / wiggle animation for Android
<?xml version="1.0" encoding="utf-8"?>
<set xmlns:android="http://schemas.android.com/apk/res/android">
<rotate
android:duration="70"
android:fromDegrees="-5"
android:pivotX="50%"
android:pivotY="50%"
android:repeatCount="5"
android:repeatMode="reverse"