Operation Null Mind 0.4.1
A 2D roguelike top down shooter game made with SDL2
 
Loading...
Searching...
No Matches
gun_animations.c File Reference

Handles weapon animation states and transitions. More...

#include <gun.h>
#include <player.h>

Functions

void Gun_AnimationUpdate ()
 [PostUpdate] Updates the gun's animation state
 

Detailed Description

Handles weapon animation states and transitions.

Manages animations for different gun states including idle, firing, and reloading with proper sprite flipping.

Note that the reloading animations aren't implemented yet.

Selects the appropriate animation clip based on gun orientation and advances the animation frame.

Author
Mango
Date
2025-03-05

Function Documentation

◆ Gun_AnimationUpdate()

void Gun_AnimationUpdate ( )

[PostUpdate] Updates the gun's animation state

Updates gun animations.

Selects the appropriate animation clip based on gun orientation and advances the animation frame.