void Awake() { pa = GetComponent<PlayerAttribute> (); myTransform = transform; onePedalWidth = ironPedal.GetComponent<Renderer> ().bounds.size.x; onePedalHeight = ironPedal.GetComponent<Renderer> ().bounds.size.y; playerWidth = 0.4f; playerHeight = 0.4f; weatherControll = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<WeatherControll> (); items = GetComponent<Items> (); ground = GameObject.FindGameObjectWithTag (Tags.ground); grounded = true; hash = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<HashIDs> (); anim = GetComponent<Animator> (); fallQuick = false; }
void Awake() { player = GameObject.FindGameObjectWithTag (Tags.player); initOffset = player.transform.position.y - 0; playerControl = player.GetComponent<PlayerControl> (); items = player.GetComponent<Items> (); weatherControl = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<WeatherControll> (); //加载本地存储的分数 }
void Awake() { weatherControll = GameObject.FindGameObjectWithTag (Tags.gameController).GetComponent<WeatherControll> (); goneSpeed = 1f; sounds = GameObject.FindGameObjectWithTag ("Sounds"); }