2Dのシューティングゲームを、ドットインストールを見ながら作っています。
動画通りにやっていたはずなのですが、スクリプトが反応しなく、自機がうごきません。
コードは以下の通りです。
スクリプトが反映されない、でグーグル検索したのですがわかりませんでした。
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PlayerScript : MonoBehaviour
{
// Start is called before the first frame update
void Start()
{
} // Update is called once per frame void Update() { float dx = Input.GetAxis("Horizotal") * Time.deltaTime * 8f; float dy= Input.GetAxis("Vertical") * Time.deltaTime * 8f; transform.position = new Vector3( transform.position.x + dx, transform.position.y + dy, 0f ); }
}
もしおわかりになる方がいらっしゃいましたら教えていただけると幸いです。。。
回答1件
あなたの回答
tips
プレビュー
バッドをするには、ログインかつ
こちらの条件を満たす必要があります。
2019/03/13 01:54