Absolute beginner here.
I have an assignment to make a single screen 2D game.
My game has a lumberjack walking around a fixed screen with bad guys spawning.
I have idle, walk and attack sprite animations.
Need a player controller script (prefer a tutorial).
Lumberjack starts at idle animation.
On left mouse click lumberjack switches to walk animation, turns in clicked direction and moves to the clicked position.
On right mouse click lumberjack switches to attack animation(cycles once) and turns in the clicked direction.
If lumberjack has attacked in range of enemy produce blood particle effect from enemy and enemy dies.
Can anyone direct me to a resource that could teach me to write this script ?
Thanks in advance.