Hello Everyone.
Now I have my project set up where there are two scripts, one handles the touch controls, score and submits it to the leader boards. It does all this perfectly. The other script is in charge of the achievements which does not work.
using UnityEngine;
using System.Collections;
public class achivement : MonoBehaviour {
public int[] achive = new int[] {100, 1000, 9000, 15000, 25000};
public int i = 0;
public string[] achivements = {"CgkIw9GY-aYIEAIQAg"," CgkIw9GY-aYIEAIQAw","CgkIw9GY-aYIEAIQBA","CgkIw9GY-aYIEAIQBQ","CgkIw9GY-aYIEAIQBw" };
Bloop bloop;
// Use this for initialization
void Start () {
GameObject camera = GameObject.FindGameObjectWithTag("MainCamera");
bloop = camera.GetComponent<Bloop>();
}
// Update is called once per frame
void Update () {
if (bloop.score >= achive*)*
-
{*
_ Debug.Log(achive );_
_ Social.ReportProgress(achivements*, 100.0f, (bool success) => {
if(success)
i++;
else*
* print (“Something went wrong”);
});*_
* }*
* }*
}
The first script calls for all the Google Play stuff. It calls
PlayGamesPlatform.Activate ();
Do I need to put that in the above script? I have tried but to no avail.