mattak's blog

人生を1ミリ進める

ゲームブートキャンプ3日目

今日も24:30-のスタート 1hくらいか、きびしいー。土日で巻き返そう。 

今日やること

  • Unityのシーン遷移方法
  • キャラのSpriteアニメーション

File->NewScene

File->SaveScene で保存

Asset->Create ->Screate Empty TitleMenuにリネーム

Asset->Create -> C# Script TitleController.csにリネーム

TitleController.csをTitleMenuにドラック&drop 下記を記述

using UnityEngine;
using System.Collections;

public class TitleMenuController : MonoBehaviour {

    // Use this for initialization
    void Start () {

    }

    // Update is called once per frame
    void Update () {

    }

    void OnGUI () {
        GUI.Label (new Rect (Screen.width / 2 - 50, Screen.height / 2, 100, 60), "Game Title");
        if (GUI.Button (new Rect (Screen.width / 2 - 70, Screen.height / 2 + 30, 100, 25), "GameStart")) {
            print( "Game Start!!" );
        }
    }
}

スタートする。 やったゲームオブジェクトひょうじ&Scriptで連結できた!

全然要件を達成してないけど激ねむいのでもうむり・・・