Esempio n. 1
0
 public void Awake()
 {
     if (!PlayerPrefs.HasKey("level"))
     {
         PlayerPrefs.SetInt("level", 1);
     }
     if (!created)
     {
         DontDestroyOnLoad(gameObject);
         created = true;
     }
     load = FindObjectOfType <LoadMenuControl>();
 }
Esempio n. 2
0
 private void Awake()
 {
     lives.SetValue(3);
     load      = FindObjectOfType <LoadMenuControl>();
     livesBar  = FindObjectOfType <LivesBar>();
     rigidbody = GetComponent <Rigidbody2D>();
     animator  = GetComponent <Animator>();
     sprite    = GetComponentInChildren <SpriteRenderer>();
     bullet    = Resources.Load <Bullet>("Bullet");
     menu      = FindObjectOfType <Menu_table>();
     isandriod = menu.isAndroid;
     speed     = speeds[menu.GetDifficult()];
     jumpForce = jumpForces[menu.GetDifficult()];
 }
Esempio n. 3
0
 public void OnLevelWasLoaded()
 {
     load      = FindObjectOfType <LoadMenuControl>();
     isjump    = false;
     openmenu  = false;
     move      = 0;
     character = FindObjectOfType <Character>();
     if (character && isAndroid)
     {
         Control.SetAct(true);
         Control.Activate(true);
     }
     else
     {
         Control.Activate(false);
     }
 }
Esempio n. 4
0
 public void Awake()
 {
     load = FindObjectOfType <LoadMenuControl>();
 }