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;
    }
Пример #2
0
    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>();
    }
Пример #3
0
 private void Start()
 {
     collider = GetComponent <PixelPerfectCollider>();
 }