Skip to content

Instantly share code, notes, and snippets.

@tsubaki
Created February 20, 2018 12:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tsubaki/461ee430803fe53eecaceecc59d52b3e to your computer and use it in GitHub Desktop.
Save tsubaki/461ee430803fe53eecaceecc59d52b3e to your computer and use it in GitHub Desktop.
using System.Collections;
using UnityEngine;
using UnityEngine.U2D;
public class Story1 : MonoBehaviour
{
[SerializeField]UnityEngine.UI.Text textbox;
[SerializeField]SpriteRenderer body, face;
[SerializeField] SpriteAtlas atlas;
IEnumerator Start ()
{
textbox.text = "衝撃のファーストブリット";
body.sprite = atlas.GetSprite("kohaku_base");
face.sprite = atlas.GetSprite("kohaku_1");
yield return new WaitUntil(()=>Input.GetMouseButtonDown(0));
yield return null;
face.sprite = atlas.GetSprite("kohaku_2");
textbox.text = "撃滅のセカンドブリット";
yield return new WaitUntil(()=>Input.GetMouseButtonDown(0));
yield return null;
face.sprite = atlas.GetSprite("kohaku_3");
textbox.text = "抹殺のラストブリット";
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment