5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

Qiitaの使い方

Last updated at Posted at 2018-05-12

MarkDownで書く

ここで説明してる。

プログラム技法やノウハウ以外は書かない

関係ない事書くと運営から限定共有化されます。利用規約を良く読みましょう。なのでテスト投稿とか雑記とかそういうのは 個人ブログでやれや という事なのでしょう。多分。

よく見るコードが貼られているアレってどうやんの?

  • まず貼りたいソースをクリップボードにコピー
  • 半角で`(バッククォート。「@」をShiftキー押しながら入力)を3回+言語指定
  • C#(cs), C++(cpp), css, html, xml, java, javascript, php, perl, python, ruby, sql など
  • 最後`を3回

using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class transe_delta : MonoBehaviour {
    public float mvsp = 3;

    // Use this for initialization
    void Start () {
	}
	
	// Update is called once per frame
	void Update () {
        if (Input.GetKey(KeyCode.LeftArrow))
        {
            float ddt = Time.deltaTime * mvsp;
            transform.position += (new Vector3(-ddt, 0, 0));
        }
        if (Input.GetKey(KeyCode.RightArrow))
        {
            float ddt = Time.deltaTime * mvsp;
            transform.position += (new Vector3(ddt, 0, 0));
        }
        if (Input.GetKey(KeyCode.UpArrow))
        {
            float ddt = Time.deltaTime * mvsp;
            transform.position += (new Vector3(0, 0, ddt));
        }
        if (Input.GetKey(KeyCode.DownArrow))
        {
            float ddt = Time.deltaTime * mvsp;
            transform.position += (new Vector3(0, 0, -ddt));
        }
    }
}

色まで勝手につけて整形してくれる。

その他チップス

ここでもまとめている。

5
3
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
5
3

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?