Profile cover photo
Profile photo
Valentin Mocanu
About
Posts

Post has attachment
I recently bought and played a game named Godus. I’ve seen an interesting sound effect and I will try to replicate it into unity. http://youtu.be/DGUQ_heFjRU?t=8m40s (demo is old, now the game looks different) Here is the GameManager.cs: public static int…
Add a comment...

Post has attachment
This two things are easy to do but many people don’t know how, so I will explain. Random spawn : public GameObject[] prefab; void RandomSpawn(){ Instantiate(prefab[Random.Range(0, prefab.Length)], position, rotation); } Play random sounds: public…
Add a comment...

Post has attachment
In the last part I showed how to jump through platforms. Now I will show you how to implement the side teleporting. ( example ) This code is attached on the player: void OnTriggerEnter2D(Collider2D other){ if(other.gameObject.name == "RightColl" ||…
Add a comment...

Post has attachment
I wanted to put a 3,2,1 counter before my game starts. I have set the timeScale to 0 in Start function and then I realized that WaitForSeconds is based on timeScale. The workaround is from unity answers. IEnumerator Counter(){ while(!started){ … Continue…
Add a comment...
Wait while more posts are being loaded