Jump to content
This site uses cookies! Learn More

This site uses cookies!

armedunity.com uses cookies to improve user experience.

By continuing to use this site, you agree to allow us to store cookies on your computer.

Dr.Crispy

Member
  • Content count

    34
  • Joined

  • Last visited

Community Reputation

3 Neutral

About Dr.Crispy

  • Rank
    Member

Profile Information

  • Gender
    Male
  • Location:
    Poland
  1. Unity Ads counter

    using System; using UnityEngine; using UnityEngine.Advertisements; public class AdvertisementTest : MonoBehaviour { int adsCounter; public int adsLimit; void Awake() { if (Advertisement.isSupported) { Advertisement.allowPrecache = true; Advertisement.Initialize ("Number ID Game"); } else { Debug.Log("Platform not supported"); } } void OnGUI() { if (adsCounter < adsLimit) { if (GUI.Button (new Rect (10, 10, 150, 50), Advertisement.isReady () ? "Show Ad" : "Waiting...")) { // Show with default zone, pause engine and print result to debug log Advertisement.Show (null, new ShowOptions { pause = true, resultCallback = result => { Debug.Log(result.ToString()); adsCounter++; } }); } } else { //wait for a reset } } }
  2. Unity Ads counter

    You need to create int value (ads counter) and increment it after showing ads. Before showing ads check that the value is less than 3. If you want to reset counter after some time, use a timer.
  3. Updating game after release it..?

    http://answers.unity3d.com/questions/21014/how-can-i-update-my-game-client-after-release.html
  4. A cube that go around

    Try something like that: using UnityEngine; using System.Collections; public class CubeGoAround : MonoBehaviour { public enum Direction { Down, Right, Up, Left }; public float DownLimit; public float RightLimit; public float UpLimit; public float LeftLimit; public float MovementSpeed; public Direction direction; void Update() { if(direction == Direction.Down) { if(transform.position.z <= DownLimit) { direction = Direction.Right; } else { transform.position -= transform.forward * Time.deltaTime * MovementSpeed; } } if(direction == Direction.Right) { if(transform.position.x >= RightLimit) { direction = Direction.Up; } else { transform.position += transform.right * Time.deltaTime * MovementSpeed; } } if(direction == Direction.Up) { if(transform.position.z >= UpLimit) { direction = Direction.Left; } else { transform.position += transform.forward * Time.deltaTime * MovementSpeed; } } if(direction == Direction.Left) { if(transform.position.x <= LeftLimit) { direction = Direction.Down; } else { transform.position -= transform.right * Time.deltaTime * MovementSpeed; } } } }
  5. Get data from php to unity

    I would notice your script is vulnerable to SQL Injection attack. You should parse arguments using e.g. mysql_real_escape_string function, but as heywhite said, MySQL is deprecated. $sql = mysql_query("SELECT * FROM people (`Kills` , `Deaths` ), WHERE `user`='".mysql_real_escape_string($user)."'"); Answering your question, I think the problem is that you use a quotes when printing page content. It should be Debug.Log(w.text); instead of Debug.Log("w.text");
  6. Radioactive attach to the any gameobject. _Radioactive - radioactive cargo (only need object with rigidbody component) Spawn - radioactive cargo spawn RadioactivePrefab - object with pollution script Other body attach to the bodies susceptible to pollution.
  7. Bugs have been corrected. Now the script is working properly
  8. Hello ;)

    I also recommend unitycookie channel.
  9. Windows 8!

    Which system you recommend the most?
  10. Windows 8!

    Now you have a mac?
  11. Thank you very much!
  12. Windows 8!

    It's true, the Windows 8 start menu is epic I, however, am using Windows 7, but I'm wondering about Linux.
  13. [C#]Electricity sparks

    An interesting idea for the script.
×