Skip to content

Instantly share code, notes, and snippets.

@ricklon
Created February 4, 2021 00:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ricklon/a0ba01570241ef4580c8228268020736 to your computer and use it in GitHub Desktop.
Save ricklon/a0ba01570241ef4580c8228268020736 to your computer and use it in GitHub Desktop.
Unity 2D sprite combat

What I've learned so far:

  • you need to define what the "robot" or "player" can do. left, right, jump, crouch vs up,dow,left,right.attack, spinup. spindown, flameon, flameoff
  • Then separate activities into "controller" and "movement"
  • I think this is helpful in case NPCs or opponets need to be able to fight.
  • Then it's critical to use "layers" but not the "sortable" layers. For barries, ground, robots, hazards
  • I think the animations and sprite layers should be sortable layers based on default.
  • But that's a guess.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment