Skip to content

Instantly share code, notes, and snippets.

@grimmdev
grimmdev / SkinChanger.cs
Last active August 11, 2020 22:25
Using spine, attaching skin placeholders from other skins.
using Spine.Unity;
using UnityEngine;
using System.Collections.Generic;
[RequireComponent(typeof(SkeletonAnimation))]
public class SkinChanger : MonoBehaviour {
private SkeletonAnimation sa;
private Skin originalSkin;
@grimmdev
grimmdev / Steps.txt
Created March 25, 2017 21:14
Setup LAMP PHP7 Debian Jessie
# echo 'deb http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list
# echo 'deb-src http://packages.dotdeb.org jessie all' >> /etc/apt/sources.list
$ cd /tmp
$ wget --no-check-certificate https://www.dotdeb.org/dotdeb.gpg
$ apt-key add dotdeb.gpg
$ rm dotdeb.gpg
$ apt-get update
$ apt-get install php7.0 php7.0-fpm php7.0-gd php7.0-mysql lighttpd nano
@grimmdev
grimmdev / welcome.js
Last active December 8, 2016 08:13
Welcome Plugin, developed for Scriptcraft Minecraft Server Plugin. Perfect example getting commands/options/arguments.
// Welcome Plugin
// 1.0
// Sean Loper
// Displays a message on player join with custom setting to change it to another message.
var VERSION = '1.0';
var COLOR = '\u00A79';
var WELCOME_MSG = 'Welcome To The Server!';
function myPlayerJoinHook( event ){
@grimmdev
grimmdev / Commands.md
Last active November 2, 2016 11:19
SWG Commands

Interaction with the world / objects / targets

  • /consent Allows targeted player to Customize your vehicle/droid and to revive you if they are a medic.
  • /con Displays difficulty rating of creature or NPCs compared to the your skill with your weapon in hand.
  • /conversationStart Starts a conversation with the target.
  • /conversationStop Ends a conversation with the target.
  • /disband Disband the entire group if you are leader, or make you quit the group if you are only member.
  • /drop Drops the targetted item in your possession.
  • /duel Challenges the targetted player to a duel. Duels are to the death or until one player types /endduel.
  • /endduel Ends a duel.
  • /examine Brings up a window with information about the target.
@grimmdev
grimmdev / WalkVRController.cs
Created July 15, 2016 21:39
VR Walk Controller, Walk in place to move forward.
using UnityEngine;
using System.Collections;
public class WalkVRController : MonoBehaviour {
[SerializeField]
private float walkSpeed = 2f;
private float walkNormalize = 0.1f;
[SerializeField]
private float sensorThreshold = 1f;
@grimmdev
grimmdev / SpriteAnimator.cs
Created July 2, 2016 15:38
Sprite Animator for Unity
using UnityEngine;
using System.Collections;
public class SpriteAnimator : MonoBehaviour
{
[System.Serializable]
public class AnimationTrigger
{
public int frame;
public string name;
@grimmdev
grimmdev / ShortGUID.cs
Last active April 15, 2017 09:21
32 bits of goodness.
using System;
public class ShortGUID
{
private static Guid tmpGuid;
public static string NewGuid()
{
tmpGuid = Guid.NewGuid ();
return Convert.ToBase64String(tmpGuid.ToByteArray());
@grimmdev
grimmdev / PreferenceUtility.cs
Created February 23, 2016 08:30
Preferences Utility for Unity 3D and uLiveWallpaper
// Sean Loper
// 2016
// PreferenceUtility.cs
using UnityEngine;
using System.Globalization;
using LostPolygon.uLiveWallpaper;
public class PreferenceUtility
{
@grimmdev
grimmdev / JSONExtras.cs
Created January 8, 2016 03:15
Extra and useful JSON Functions for SimpleJSON
using UnityEngine;
using System.Collections;
using System.Collections.Generic;
using SimpleJSON;
public class JSONExtras {
public int[] ToIntArray(string n) {
var j = JSON.Parse(n);
int[] a = new int[j.Count];
@grimmdev
grimmdev / miniscriptexample1.txt
Last active January 7, 2016 05:16
miniscript example 1
// My Example
print("Let's fly!")
ship.reset
ship.x = 0
ship.y = 0
for a in range(0, 90, 1)
ship.rot = a
wait(1/180)
end for
for a in range(0,90,1)