Esempio n. 1
0
        void Start()
        {
            imageSound = transform.Find("Panel/BtnSound").GetComponent <Image>();

            #if UNITY_ANDROID
            PlayGamesPlatform.Activate();
            Social.localUser.Authenticate((bool success) =>
            {
                if (success)
                {
                    //Удачно вошли
                }
                else
                {
                    //Ошибка
                }
            });
            #endif
            if (!PlayerPrefs.HasKey("score"))
            {
                PlayerPrefs.SetInt("score", 0);
            }

            #if UNITY_ANDROID
            AllFunc.GetAchive(achiv1);
            #endif
        }
Esempio n. 2
0
        public void Kill()
        {
            ep.enabled = false;
            GetComponent <CharacterController>().enabled = false;

            GameObject particleDeath = Instantiate(Resources.Load(AllFunc.GetPathParticleDeath())) as GameObject;

            particleDeath.transform.position = transform.position;
            OffRender();
            Invoke("DefeatGame", 1.5f);
        }
Esempio n. 3
0
 void DefeatGame()
 {
     AllFunc.Defeat();
 }