void Start() { #if UNITY_EDITOR editor = true; #endif Time.timeScale = 0; //You get the Rigidbody component you attach to the GameObject m_Rigidbody = GetComponent <Rigidbody2D>(); anim = GetComponent <Animator> (); rend = GetComponent <SpriteRenderer>(); ft = FlashingText.ft; DP = DeathPanel.instance; WP = WinPanel.instance; UIP = UIPanel.instance; //Initialising the force which is used on GameObject in various ways m_JumpForce = new Vector3(0.0f, jumpStrength, 0.0f); m_DashForce = new Vector3(dashStrength, 0.0f, 0.0f); doublejump = PlayerPrefs.GetInt("double jump", 0); if (doublejump == 1) { print("doublejump unlocked"); } jumpStart = false; tRight = false; tLeft = false; }
// Use this for initialization void Awake() { if (ft == null) { ft = this; } else { print("there is more than one flashing text"); } }