void Start() { anim = this.gameObject.GetComponent <Animator>(); isOn = CheckPointManager.GetCheckPoint(checknum); if (isOn) { anim.Play("on"); } }