[過去ログ]
【ゲームエンジン】Unityなんでも質問スレpart8 (1002レス)
【ゲームエンジン】Unityなんでも質問スレpart8 http://mevius.5ch.net/test/read.cgi/gamedev/1663487800/
上
下
前次
1-
新
通常表示
512バイト分割
レス栞
抽出解除
レス栞
このスレッドは過去ログ倉庫に格納されています。
次スレ検索
歴削→次スレ
栞削→次スレ
過去ログメニュー
462: 弟子 [] 2022/10/27(木) 11:39:10.68 ID:gXi2+Oha 久しぶりだな まずさシンプルにいこう、逆に考えてみるか void Update() { moveFunction(); if (Input.GetKeyDown(KeyCode.Space)) { rb.AddForce(rb.transform.up * 5.0f ,ForceMode2D.Impulse); jumpingFunction(); //print(max_jump_count); //print(isHitToGround()); } } private void moveFunction() { //操作方向 float x = Input.GetAxis("Horizontal"); float y = Input.GetAxis("Vertical"); //左右移動 rb.velocity = new Vector2(x * 10, rb.velocity.y); } https://i.gyazo.com/e36cc76a809b1d8bfab8303cd513ff04.png これでスペース押すと、ジャンプ繰り返すんだけど 3回目で押せなくすればいいかなと http://mevius.5ch.net/test/read.cgi/gamedev/1663487800/462
464: 名前は開発中のものです。 [] 2022/10/27(木) 11:49:17.46 ID:gXi2+Oha >>462 ちなみに、jumpingFunctionはコメントにしてある。 でこのあとは、3回目という判定と、床に着いたらクリアをつくればいいかと http://mevius.5ch.net/test/read.cgi/gamedev/1663487800/464
メモ帳
(0/65535文字)
上
下
前次
1-
新
書
関
写
板
覧
索
設
栞
歴
スレ情報
赤レス抽出
画像レス抽出
歴の未読スレ
AAサムネイル
Google検索
Wikipedia
ぬこの手
ぬこTOP
1.442s*