Skip to content

Bad-Games-Studio/strategy-pattern

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

Strategy Design Pattern in Unity

This repository shows how one can use Strategy Pattern (from the book by GoF) in Unity.

Description

Side note: the example is really simple and stupid, and serves as just a demo.

Here, Strategy Pattern is used to dynamically change how the cube moves. There are 3 possible modes:

  • Manual - controlled by player.
  • Random - it chooses where to move randomly.
  • DVD screensaver (poor copy, but still funny).

strategy-pattern-demo-screenshot-dont-read-file-name-pls

Controls

  • Arrows to move (when in Manual mode).
  • Space to cycle between manual, random velocity, and DVD screensaver modes.

About

A quick demo for Strategy Pattern

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages