Exemplo n.º 1
0
 public void End()
 {
     Dbox.SetActive(false);
     Ai.SetActive(true);
     Googler.Achieved(GPGSIds.achievement_icarus_initiated);
     StartCoroutine(TW1("VERY WELL \n WE WILL TALK AGAIN SOON  "));
 }
 void gainDetector()
 {
     for (int i = 1; i <= xp.Length - 1; i++)
     {
         if (playercomp.data.Profile.Gain > xp [i - 1] && playercomp.data.Profile.Gain < xp [i])
         {
             gaintext.text = xp [i].ToString();
             if (data2.Check[i - 1])
             {
                 //	mainAIobj.SetActive (true);
                 SetButtons((i - 1) * 3);
                 data2.Check [i - 1] = false;
                 Googler.incrementsAch(GPGSIds.achievement_the_story);
                 SavePdata();
             }
         }
     }
 }
Exemplo n.º 3
0
 private void Awake()
 {
     instance = this;
 }
Exemplo n.º 4
0
    void OnTriggerEnter(Collider Obj)
    {
        if (Obj.tag == "Obstacle")
        {
//			Dead ();
            if (hitpoints == 0)
            {
                Dead();
                Hurt.SetActive(false);
            }
            else
            {
                data.Achievements.bumps++;
                Googler.instance.CheckBump();
                Hurt.SetActive(true);
                fillHeal.fillAmount = 0;

                hitpoints = 0;
                StartCoroutine(FILL(data.Power.healDuration));
                Invoke("EndHurt", data.Power.healDuration);

                if (transform.position.x == -10)
                {
                    ShiftRight();
                }
                else
                {
                    ShiftLeft();
                }
            }
        }

        if (Obj.tag == "Money")
        {
            Money += 50;
            StartCoroutine(HeadsUpDisplay("Money 50 is found"));
        }
        if (Obj.tag == "Inhale")
        {
            fill.fillAmount += 0.20f;
            StartCoroutine(HeadsUpDisplay("Inhaler rate 20%  is increased"));
        }
        if (Obj.tag == "Bike")
        {
            BikeEnabled();
        }
        if (Obj.tag == "Skill")
        {
            data.Profile.Skill_Point++;
            StartCoroutine(HeadsUpDisplay("Skillpoint has found"));
            Googler.instance.CheckSkill();
            SaveData();
        }
        if (Obj.tag == "Unknown")
        {
            int a = Random.Range(0, 2);
            if (a == 0)
            {
                int m1 = Random.Range(0, 201);
                Money += m1;
                if (m1 == 200)
                {
                    Googler.Achieved(GPGSIds.achievement_the_lucky_duck);
                }
                StartCoroutine(HeadsUpDisplay("Money " + m1 + "  is found"));
            }
            else
            {
                float ab = Random.Range(0, 0.3f);

                fill.fillAmount += ab;
                string asw = (ab * 100).ToString("0");
                StartCoroutine(HeadsUpDisplay("Inhaler rate " + asw + "%  is increased"));
            }
        }
    }