Answer by Lovrenc
Have a variable that collects the clicks (every time user clicks, increase it by one). Remember interval start time: `long startTime = DateTime.Now.Ticks / TimeSpan.TicksPerMillisecond;` Now you have...
View ArticleAnswer by Lovrenc
using UnityEngine; using System.Collections; public class ScrollScript : MonoBehaviour { public float speed = 0; void Update () { renderer.material.mainTextureOffset = new Vector2(0f, -Time.time *...
View ArticleAnswer by Lovrenc
No. Unity is perfectly fine for that matter. But if the question is about the games themselves, than i'd say its only good idea if you are doing it to learn or for enjoyment.
View ArticleAnswer by Lovrenc
You could use something like that. Maybe some elements from other classes are missing, modify it for your need. On mobile you really want to reuse elements. Every time garbage collector does his job,...
View ArticleAnswer by Lovrenc
[Maybe this will clear it up.][1]> On instance methods, 'this' is implicitly passed to each method transparently, so you can access all the members it provides.> Extension methods are static. By...
View ArticleAnswer by Lovrenc
There are couple of possibilities. 1) Your value is changed by a different thread. From the snippet I suspect you are fairly new coder so it might be the code you copied/included from third party. 2)...
View ArticleAnswer by Lovrenc
1) Check out [this function.][1] 2) Search [old questions.][2] 3) Look in MouseLook script in Standard Assets, it has this implemented [1]: http://docs.unity3d.com/ScriptReference/Mathf.Clamp.html [2]:...
View ArticleAnswer by Lovrenc
You could use [raycast][1]. You can set the distance of the raycast, so if it hits object, you know it is close enough. Now if that object is one you can interact with, you can popup a note to notify...
View ArticleAnswer by Lovrenc
[Explanation of error.][1] Maybe you should try to understand it instead of getting others to do stuff for you. CountSeconds = CountSeconds + (CountMinutes * 60); //You should multiply here not sum...
View ArticleAnswer by Lovrenc
It says it all in the error message. public GameObject shipObject; void Start () { shipObject = GameObject.Find ("Default"); } The problem there is, code outside of functions is executed before any...
View Article