public void Awake() { if (!PlayerPrefs.HasKey("level")) { PlayerPrefs.SetInt("level", 1); } if (!created) { DontDestroyOnLoad(gameObject); created = true; } load = FindObjectOfType <LoadMenuControl>(); }
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()]; }
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); } }
public void Awake() { load = FindObjectOfType <LoadMenuControl>(); }