Skip to content

A collection of essential Unity 2D scripts to make a game.

Notifications You must be signed in to change notification settings

r2d2meuleu/unity2d-essential-scripts

Repository files navigation

Inside the project you can find various plug-and-play scripts,

meaning you just have to drop them on your gameObject to make them work.


As of for now, in this project you can find scripts for:


Movement 🦶
Topdown Movement

dialogue

Platform Movement with jump (and double jump)

dialogue

Drag and Shoot Movement

dialogue

Grid based Movement

dialogue

Flappy Bird like movement

dialogue


Dialogues 💬
- TypeWriter Effect for text;
- Multiple choice based dialogue;
- Conversation between multiple characters;
- Scriptable object used to easily create dialogues.

dialogue multiple-choice-dialogue


Health system 💖
Zelda like health system
- Full/Empty hearths;
- Dev can decide total amount of hearths;
- PlayerPref ready.

health

Health slider system
- Fully customizable slider;
- Dev can decide total amount of HPs;
- PlayerPref ready.

health


Quest System ❕
Quest Manager
- Create new quests;
- Check quests completion.
Quest Marker
- Mark quests a completed via OnTriggerEnter or by pressing a given KeyCode inside its area.
Quest Object Activator
- Activate/Deactivate a given object upon quest completion;
- Could also implement UnityEvents.

quest


Platform Spawner ⬜
- Spawn a gameObject and move it from point A to B;
- Useful for games like Flappy Bird or Endless Runners.

platforms


Audio Managment 🔉
Audio Slider
- Dedicated custom sliders and scripts to manage audio runtimes;
- Save audio volume inside a PlayerPrefab that will save and use the value on start.
Audio Toggle
- Mute audio of a selected group of sliders;
- Value is saved in a prefab and will be set as such on start;
- Customizable KeyCode to quickly mute/unmute audio. 

audio


Enemy Spawners 🧛‍♂️
- Spawn a random object from an array of gameObjects
- Select a Min/Max numbers of enemies to spawn per callback
- Select how many enemies can be active at the same time
Spawn gameObjects inside Tilemap

spawner

Spawn gameObjects inside Area

spawner


Animator Overrider 🦎
- Override the animator to change on object appearance runtime
- Can call the function via scripts and on button click as in the example below
- Add as many Animator Overriders as you wish and change between them via simple Functions
- Sample scene provided

override


There's more i'm planning to add to the repository, i'll work on it for as much as i have time.
At the moment there are 27 scripts.


Credits 👑
  • This project uses @PixeyeHQ inspector foldout group to make the development cleaner;

  • The hearths sprites used in the zelda like hearth system were taken from NicoleMarieT on itch.io;

  • The font used is taken from Void on itch.io;

  • Tilemap asset taken from Adam Saltman on itch.io;

  • Enemy sprite taken from 0x72 on itch.io;

  • Button UIs comes from Sumo Studio;

  • Tiny Heroes come from Free Game Assets;

  • Anime background taken from NoranekoGames;

  • Anime characters from Sutemo customized thanks to Exuin character creator.

About

A collection of essential Unity 2D scripts to make a game.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages