0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【9日目】25日間でCocos Creatorでゲームを作る

0
Posted at

ログインフォームを作成する

ポップアップを作成する

  1. MenuSceneのヒエラルキーのCanvasにEnpty Nodeを追加する
  2. AuthPopupにリネームする

ポップアップの裏の背景を作成する

  1. AuthPopupを右クリック→Create→2D Object→Spriteを選択する
    ※ポップアップ以外選択できなくする半透明の背景になります
  2. Blockerにリネームする
  3. インスペクターパネル→Add Component→Widgetで検索→cc.Widgetを選択する
  4. Left, Right, Top, Bottomを0にする
    image.png
    ※画面全体が覆われない場合、AuthPopupも同じ設定にする
  5. Spriteを黒の半透明にする
    image.png
  6. Sprite Frameをdefault_sprite_splashへ置き換える
    image.png

ポップアップパネルを作る

  1. AuthPopupを右クリック→Create→2D Object→Spriteを選択する
  2. PopupPanelにリネームする
  3. インスペクターパネルのUITransformでサイズを変更する
    image.png
  4. Sprite Frameをdefault_sprote_splashに変更する

EditBoxを配置する

  1. PopupPanelを右クリック→UI Component→EditBoxと選択する
  2. InputFieldにリネームする
  3. インスペクターパネルのPlaceholderを「ユーザー名を入力してください」に変更する
  4. Input ModeをSINGLE_LINEにする

ボタンを設置する

  1. PopupPanelを右クリック→UI Component→Buttonと選択する
  2. インスペクターパネル→Add Component→Widgetで検索→cc.Widgetを選択する
  3. 画像と同じ設定をする
    image.png
  4. ボタンのテキストを「ログイン」にする

まとめ

今回はパスワード認証なしで、サーバーに登録されているユーザー名で認証します。

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?