見出し画像

【ティラノスクリプト】タイトル画面をフェードイン・フェードアウトさせるサンプル

タイトル画面をフェードイン・フェードアウトさせるサンプルです。

【使用素材】

https://min-chi.material.jp/

みんちりえ様の素材を使用させていただきました。

【tyrano.css等】

.slide_bg {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 720px;
  background-image: url(../data/bgimage/bg1.jpg), url(../data/bgimage/bg2.jpg), url(../data/bgimage/bg3.jpg), url(../data/bgimage/bg4.jpg); 
  background-size: cover;
  background-position: top;
  animation: slide 35s cubic-bezier(0.19, 1, 0.22, 1) 3s infinite;
}
@keyframes slide {
  0% {
    background-image: url(../data/bgimage/bg1.jpg);
  }
  25% {
    background-image: url(../data/bgimage/bg2.jpg);
  }
  50% {
    background-image: url(../data/bgimage/bg3.jpg);
  }
  75% {
    background-image: url(../data/bgimage/bg4.jpg);
  }
  100% {
    background-image: url(../data/bgimage/bg1.jpg);
  }
}

【title.ks】

[cm]

@clearstack
@bg storage ="bg1.jpg" time=100
@wait time = 200

[html]

<div class="slide_bg"></div>

[endhtml]

*start 

[button x=135 y=230 graphic="title/button_start.png" enterimg="title/button_start2.png"  target="gamestart" keyfocus="1"]
[button x=135 y=320 graphic="title/button_load.png" enterimg="title/button_load2.png" role="load" keyfocus="2"]
[button x=135 y=410 graphic="title/button_cg.png" enterimg="title/button_cg2.png" storage="cg.ks" keyfocus="3"]
[button x=135 y=500 graphic="title/button_replay.png" enterimg="title/button_replay2.png" storage="replay.ks" keyfocus="4"]
[button x=135 y=590 graphic="title/button_config.png" enterimg="title/button_config2.png" role="sleepgame" storage="config.ks" keyfocus="5"]

[s]

*gamestart
;一番最初のシナリオファイルへジャンプする
@jump storage="scene1.ks"


この記事が気に入ったらサポートをしてみませんか?