Exemplo n.º 1
0
 void Start()
 {
     Player             = GameObject.FindObjectOfType(typeof(player)) as player;
     Achievements       = GameObject.FindObjectOfType(typeof(achievements)) as achievements;
     player             = GameObject.FindGameObjectWithTag("Player");
     transform.position = new Vector3(Random.Range(-2.4f, 2.4f), Random.Range(player.transform.position.y + 6, player.transform.position.y + 9), transform.position.z);
 }
Exemplo n.º 2
0
    public static void SaveAchievementData(achievements Achievement)
    {
        BinaryFormatter formatter = new BinaryFormatter();
        string          path      = Application.persistentDataPath + "/AchievementsData.xd";
        FileStream      stream    = new FileStream(path, FileMode.Create);
        data            data      = new data(Achievement);

        formatter.Serialize(stream, data);
        stream.Close();
    }
Exemplo n.º 3
0
 public data(achievements Achievement)
 {
     achievementComplete = new bool[Achievement.completed.Length];
     for (int i = 0; i < Achievement.l; i++)
     {
         achievementComplete[i] = Achievement.completed[i];
         turbCount = Achievement.turbCount;
     }
     coins = Achievement.coins;
 }
Exemplo n.º 4
0
    public void UpdateAchievement(achievements achiv, int increment)
    {
        //Increment

        /*PlayGamesPlatform.Instance.IncrementAchievement(
         * GPGSIds.achievement_sharpshooter,
         *            1,
         *            (bool success) => {
         *                Debug.Log("(Lollygagger) Sharpshooter Increment: " +
         *                   success);
         *            });*/
    }
Exemplo n.º 5
0
        private void metroButton19_Click(object sender, EventArgs e)
        {
            if (ActiveMdiChild != null)
            {
                ActiveMdiChild.Close();
            }
            achievements newMDIChild = new achievements();

            // Set the Parent Form of the Child window.
            newMDIChild.MdiParent = this;
            // Display the new form.
            newMDIChild.Show();
            newMDIChild.Dock = DockStyle.Fill;
        }
Exemplo n.º 6
0
 public void UpdateAchievement(achievements achiv)
 {
     if (Social.localUser.authenticated)
     {
         switch (achiv)
         {
         case achievements.achievement_new_animal:
             PlayGamesPlatform.Instance.ReportProgress(
                 GPGSIds.achievement_new_animal,
                 100.0f, (bool success) => {
                 MMA.debugText.text += "\n(RunForLife) Welcome Unlock: " +
                                       success;
             });
             break;
         }
     }
 }
Exemplo n.º 7
0
 public void go()
 {
     achievements = FindObjectOfType <achievements>();
 }