Unity Day

It’s the Thursday before the bank holiday. No work booked in for today and I’m all up to date on client projects. This sounds like a method call for – Unity Day! I can’t believe it’s been two years since I created Cubes Version 1.0 After...

Substitution Principle

Posting this for a very similar reason to my Cursor Affordance post. I already know what the Substitution Principle is, I just did not know what it was called. By definition “the principle defines that objects of a superclass shall be replaceable with objects of...

Cursor Affordance

This isn’t a new idea to me but a new terminology is. So writing it down to help me remember. Cursor affordance! An important GUI feedback mechanism to allow a player to receive information about possible actions via the cursor/pointer. For example, can I attack...

2D Animation Transitions

Over the last few weeks (when not writing my Medieval Realms plugin) I’ve been spending a little time working out how to do 2D animation transitions in Unity. Here’s a little video. Currently there’s an idle animation, blink animation, walk...

RigidBody and RigidBody2D Script Initialisation

So yeah. Two different ways. Not sure why one is better than the other. Yet. Method 1. Attach RigidBody2D to the Game Object and then create a local private variable in the script. This approach feels better imo, so that is what I’m using. RigidBody2d rb2d;...

Player Input

public class ButtonInput : MonoBehaviour { void Update () {  bool down = Input.GetKeyDown(KeyCode.Space);         bool held = Input.GetKey(KeyCode.Space);         bool up = Input.GetKeyUp(KeyCode.Space); if(down) { } else if(held) { } else if(up) { } else { } } }...