select10 | 無料ゲーム投稿サイト unityroom - Unityのゲームをアップロードして公開しよう
序文
「Select10」模写5日目。
インプットとアウトプットとその他もろもろの1日の活動スケジュール(理想)を検討した結果、ブログのネタにかける時間を1時間減らしてみることにしました。
ということでちゃっちゃっとやっていきたいと思います。
進捗
- start文字列の表示・SE
- スタートボタンのアニメーション
コード実装部分(一部)
Select10Copy\Assets\Scripts\TitleDisplayer.cs
using System.Collections; using UnityEngine; namespace Title { public class TitleDisplayer : MonoBehaviour { public TitleLogoFader titleLogoFader; public GameObject title10Button; public Title10ButtonSound title10ButtonSound; public Title10ButtonAnimator title10ButtonAnimator; public GameObject titleArrow; public TitleArrowSound titleArrowSound; public TitleArrowAnimator titleArrowAnimator; // Start is called before the first frame update void Start() { StartCoroutine(_TitleDisplayer()); } private IEnumerator _TitleDisplayer() { float fadeInTime = 1.0f; titleLogoFader.FadeIn(fadeInTime); yield return new WaitForSeconds(fadeInTime); title10Button.SetActive(true); title10ButtonSound.SoundSE(); float button10AnimationTime = 1.0f; title10ButtonAnimator.AnimateActivate(button10AnimationTime); yield return new WaitForSeconds(button10AnimationTime); titleArrow.SetActive(true); titleArrowSound.SoundSE(); float arrowAnimationTime = 0.5f; titleArrowAnimator.Animate(arrowAnimationTime); yield return new WaitForSeconds(arrowAnimationTime); } } }
実行結果
感想
タイトル画面模写続き。
"start->"の文字が画面外からスクロールしてくるアニメーションとボタンを押したときのアニメーションを実装。
ついでにマジックナンバーを修正。
おおむね昨日と同じやり方で問題なかったが、ついにイベントハンドラーが出てきたのでここらへんから設計がややこしくなりそう。
イベントハンドラーが「呼び出される処理」を表すことはようやく分かってきたが、「イベントハンドラー自体を呼び出す処理」を何と呼べばよいのかよくわからない。
(元のプロジェクトを調べる)
…普通はそんなもん意識しなくてよいようだ。
"On~"みたいな名前をつければいいのか。
そんなレベルでやってます。
カロリーメイトください。

- 出版社/メーカー: 大塚製薬
- メディア: 食品&飲料
- この商品を含むブログを見る
参考
今日のunityroom
富山でGO | 無料ゲーム投稿サイト unityroom - Unityのゲームをアップロードして公開しよう
www.youtube.com
好き。