Right now, all it does is display how many coins you have collected from bears, but I'm working on a mockup for the general UI design for the battle screen.
Cropping is for losers.
I also did a lot of behind-the-scenes fixing. I spent a lot of time bashing my head against Unity's physics engine. It's kind of hard to be like "No, I don't want any of these features, I just want these guys to move left and right and do shit when you click on them or if they smash into eachother. I don't care about realistic physics in any way shape or form." Also coroutines were sent by the devil to torment me.
Dear whoever wrote the Unity documentation,
The following is really difficult to understand:
using UnityEngine;
using System.Collections;
public class example : MonoBehaviour {
IEnumerator Do() {
print("Do now");
yield return new WaitForSeconds(2);
print("Do 2 seconds later");
}
IEnumerator Example() {
yield return StartCoroutine("Do");
print("Also after 2 seconds");
print("This is after the Do coroutine has finished execution");
}
}
The following is not:
using UnityEngine;
using System.Collections;
public class SelfDestroyingObject : MonoBehaviour{
void Start(){
Debug.Log ("Object Created");
transform.position = new Vector3 (0,0,0);
StartCoroutine(WaitThenDestroySelf());
}
IEnumerator WaitThenDestroySelf(){
yield return new WaitForSeconds(2);
Debug.Log ("Object Destroyed");
Destroy (gameObject);
}
If you run this code, it will Debug the phrase "Object Created", move the object to (0,0,0), wait 2 seconds, Debug the phrase "Object Destroyed", then destroy itself!
Oh hey! Look! I just wrote up a freaking example that in some basic way describes a thing that a game object might do, then afterwards I SAID WHAT THE CODE DID. WOW THAT WAS REALLY HARD. WAY HARDER THAN WALKING MY BRAIN THROUGH SEVERAL LINES OF METHODS NAMED "Do Stuff".
Sorry... I get mad when techy people make simple things totally indecipherable.
No comments:
Post a Comment