Skip to content

Instantly share code, notes, and snippets.

Avatar
how do i post stories??? i quit facebook for this

Alan Du aDu

how do i post stories??? i quit facebook for this
View GitHub Profile
@aDu
aDu / bot.js
Last active Jul 10, 2020
Eris react to role bot (using https://github.com/abalabahaha/eris/). Gives the Guild Discord role when reacting (removes the role if you already had the role).
View bot.js
var emojiToRole = {
'❤️': '730969029392597014',
'🧡': '550097270906028042',
'💛': '730970455158292582',
'💚': '730970493527654531',
'💙': '526038406182993941',
'💜': '541054776440520744',
'🖤': '730970538335404033',
'🤍': '730982363605237800',
}
@aDu
aDu / SoundZone.cs
Last active Jul 3, 2020
Unity3D Sound Zone - Collider2D instead of point audio source (because Unity only supports audio coming from a single point or circle, instead of coming from a custom shape). AudioSource will move as close to the player as possible but keeping inside the collider. Please modify it to suit your use-cases (modify the Player.Instance and AudioMgr.I…
View SoundZone.cs
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
// 2D Sound Zone.
// Recommended AudioSource settings: Spatial Blend: 3D. Doppler Level, Spread and reverb zone mix set to 0.
// AudioSource will move as close to the player as possible, but will stay within the collider.
// Only works with only one Collider2D component.
// https://gist.github.com/aDu/d57b923c96f242e28fe029f3980c5123
public class SoundZone : MonoBehaviour