Skip to content

Instantly share code, notes, and snippets.

View MrWorner's full-sized avatar

Max MrWorner

View GitHub Profile
@MrWorner
MrWorner / PlayerAnimator.cs
Created May 13, 2023 11:01 — forked from Matthew-J-Spencer/PlayerAnimator.cs
Control unity animations using code. Video: https://youtu.be/ZwLekxsSY3Y
using System;
using UnityEngine;
using UnityEngine.Tilemaps;
using Random = UnityEngine.Random;
public class PlayerAnimator : MonoBehaviour {
[SerializeField] private float _minImpactForce = 20;
// Anim times can be gathered from the state itself, but
// for the simplicity of the video...