How to detect Tap on object
Here is my code. PROBLEM IS IN COMMENTS IN CODE void Update () { int i = 0; while (i < Input.touchCount) { if (Input.GetTouch(i).phase == TouchPhase.Began) { Ray ray =...
View ArticleHow To avoid random spawn to spawn at previously spawned object position so...
This code randomly spawns objects and then destroy them after some wait. what I want to do is to make sure the random spawned object is not spawned at previously spawned object such as it spawns above...
View ArticleShooting Projectiles With controlling attackSpeed
Hi I Have two Scripts ProjectileMotion and FSMArcherTower. I will brief you on how it works then ill tell you the problem. I Have attached both scripts to this tower and it shoots a projectile. Right...
View ArticleHow to move objects randomly spawned to other random locations
Hi i have a script which spawns objects randomly outside the viewport. Now i want the objects spawned on the right side to start moving to a random position on the left side of the outside of viewport....
View ArticleHow to move player once per swipe
Hi the SwipeDetection script im using for detecting swipes works perfect. In this script I have an enum Swipe with all the states. I set the swipeDirection variable of type Swipe to the state...
View ArticleFlood Fill algorithm implementation in C# problem
Hi i am trying to implement flood fill algorithm version 3 from Wiki [here][1] and I cant seem to get it right. I have a main method called flood fill and another helper method to get the game Object...
View ArticleHow to delete rows in a flood fill game
Hi i want to delete rows that get filled by one color in a flood fill game. The problem is that when i delete a row it gives me the null object reference error. the error occurs since the node in...
View Articleoperator == is not working every time to find if a list contains item in...
Hi i am trying to see if one list contains any item from another list by this code for (int j = 0; j < spawnedCoins.Count; j++) { for (int i = 0; i < connectedTiles.Count; i++) { if...
View ArticleNormal map not showing correctly on 2d sprite
Hi I have a simple circle sprite and a normal map made for it. When i add the normal map material i get something strange. it adds weird hexagonal shape behind the circle where as both the sprite and...
View ArticleParticle system fine in Editor but Wrong in android build
Hi i have a particle system that works in editor but when i build and run on android it gets very small. im using standard shader because i need to change the color of the material in runtime. The...
View ArticleShare screen and text on social media
Hi I have this code that works on one of my game but on the other game the picture is not being taken but the text is there. when i try to send it on for example watsapp then error occours saying...
View ArticleHow to seperate/decouple UI and player code
Hi i have 3 buttons each of which set a different projectile for a player to shoot i can have each buttons refer to the player and set the player.projectileToshoot relative to the button pressed...but...
View Articlebutton to select what player shoots
The Player shoots automatically..what it shoots depends upon which button is clicked button 1 clicked then projectile 1 is shot...button 2 clicked then projectile 2 is shot and so on I have buttons...
View Articlechange value of prefab field in a array of prefabs
Hi i have array of SpikeArea prefabs ![alt text][1] each prefab has a field called Area Size ![alt text][2] I want to know how can i expose Area Size field in the AreasList array above so that i can...
View Article