using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Skip : MonoBehaviour
{
public Sprite[] sprites = new Sprite[11];
private SpriteRenderer SpriteRender;
public Vector2 vector;
public void Start()
{
SpriteRender = GetComponent<SpriteRenderer>();
if(SpriteRender == null)
{
SpriteRender.sprite = sprites[0];
}
}
public void Update()
{
if (GlobalData.Skip >= 0 && GlobalData.Skip <= 10)
{
SpriteRender.sprite = sprites[GlobalData.Skip];
}
else
{
SpriteRender.sprite = sprites[11];
transform.Translate(vector);
}
}
}