by Yahwho | Apr 14, 2022 | Unity
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...
by Yahwho | Oct 20, 2021 | Unity
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...
by Yahwho | Oct 19, 2021 | C#, Unity
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...
by Yahwho | Jan 14, 2021 | Unity
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...
by Yahwho | Nov 12, 2020 | Unity
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;...
by Yahwho | Apr 24, 2020 | Unity
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 { } } }...