Skip to content

Chintan-Patel-Games/Command-Pattern

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

139 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎮 Command Pattern - Unity Mini Project

This project demonstrates the Command Design Pattern implemented in Unity through a simple, interactive game. The core focus is to encapsulate user actions (like undo and replay) as commands, allowing greater flexibility and control over player input history.


🚀 Features

  • Command Pattern Implementation: Actions like player movement and undo/replay are wrapped in command classes.
  • Input Abstraction: User inputs are decoupled from action logic using invoker classes.
  • Undo/Replay System: Stores a history of commands to allow reversing or reapplying actions.
  • Visual Feedback: Player moves in response to arrow keys; undo/redo updates are reflected in real-time.

🧠 Design Patterns Used

Pattern Usage
Command Encapsulates player actions as objects
Invoker Triggers commands from input
Receiver Player movement logic
Singleton Input Manager (optional global access)

🎓 Learning Outcomes

  • Better understanding of the Command Design Pattern in Unity
  • Implementing Undo/Replay functionality using command history
  • Writing modular, decoupled code for input and actions

📎 Gameplay Video

Gameplay

About

This Unity mini-project explores the Command Design Pattern by implementing a simple yet effective undo-redo system. It encapsulates player actions as command objects, making it easier to manage, extend, and debug user interactions — a foundational approach for flexible game systems and editor tools.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages

  • ShaderLab 48.6%
  • C# 43.0%
  • HLSL 8.4%