private void Start() { if ((int)World.instance.difficulty > (int)World.Difficulty.Hard) { GameObject.Destroy(gameObject); return; } collider = GetComponent <PixelPerfectCollider>(); animtor = GetComponent <SpriteAnimator>(); animtor.onAnimationEnd = OnAnimationEnd; }
private void Start() { var player = GameObject.FindObjectOfType <Player>(); foreach (var i in player.GetComponentsInChildren <Transform>()) { if (i.gameObject.name == "Sprite") { xscale = i.localScale.x; } } collider = GetComponent <PixelPerfectCollider>(); }
private void Start() { collider = GetComponent <PixelPerfectCollider>(); }