Skip to content

sumeyyenurozgenc/Unity3D-Six-Game-Example

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Unity3D-Six-Game-Example

Hi everyone. I am going to talk about six! game. I tried to write it with my code style. This game is 2D. therefore objects and added components will be 2-dimensional. For example Rigidbody2D and BoxCollider2D.

This is the first view of the project in Unity3D. firstView

I created these shapes using unit squares by activating the Grids on PhotoShop. For now I have created 4 shapes and these are inside gameobjects. Each of them consists of a combination of different square shapes. For example smallL shape, square shape etc.

hierarchy

For example; when I clicked the Shape1, I will see what shapes it consists of.

When I run the program, my prefabs will appear on the screen. I wrote the appropriate code for a smoother transition between colors.

Each object has Particular System. Particular System creates an explosion effect when exploding objects. I added Audio Source in addition to Particular System and every explosion to hear popping sound. Thus, when I detonate an object, I will see a visual explosion effect and hear an explosion sound.

The camera follows our hex along the y axis. When hex falls into space and hits colliders, the game will be over and the Try Again button will appear on the screen. I used Enum to leave the game at the last camera position. There are 2 situations here as Start and GameOver. As long as it is not GameOver, it can explode shapes and the camera will follow the hex. If there is a gameover, the Try Again Panel will be activated. The camera will take the final y-axis position of hex before it is game over and will not be able to explode any shapes in the back. If I didn't use such a condition, I would continue to explode shapes even if I was finished in the game.

CubeBoom.cs

Cube1, Cube2, dikey, Dikey3, smallL, tShape, UShape has CubeBoom.cs, BoxCollider (I arranged for every shape and added 2 BoxCollider to some shapes), Sprite Renderer to add figure, Rigidbody2D to fall according to the laws of physics.

CubeBoom

FollowHex.cs

This script is in Main Camera. Its purpose is to follow the hex and create shapes without running the program.

FollowHex

About

This project about Six Game with Unity3D and C#. I tried to do with my own code. The necessary explanations are available in read.md.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages