ARシューティングゲームの開発





キャラクターを動かす
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CharaMove : MonoBehaviour
{
void Update()
{
transform.Translate(new Vector3(0, Time.deltaTime * 1.5f, 0));
}
}

キャラクターを生み出す
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CharaGene : MonoBehaviour
{
public GameObject charaPrefab;
private int timeCount;
void Update()
{
timeCount += 1;
if (timeCount % 200 == 0)
{
GameObject chara = Instantiate(charaPrefab, transform.position, Quaternion.identity);
Destroy(chara, 10.0f);
}
}
}

【2019版】AR_Project(全9回)
| 1 | Vuforiaの初期設定を行う |
| 2 | キャラクターをAR鑑賞する |
| 3 | ★チャレンジ課題 |
| 4 | ARシューティングゲームの開発 |
| 5 | キャラを破壊する |
| 6 | オリジナルのカーソルを作成する |
| 7 | カウンターを作成する |
| 8 | ★チャレンジ課題 |
| 9 | ★チャレンジ課題 |





キャラクターを動かす
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CharaMove : MonoBehaviour
{
void Update()
{
transform.Translate(new Vector3(0, Time.deltaTime * 1.5f, 0));
}
}

キャラクターを生み出す
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class CharaGene : MonoBehaviour
{
public GameObject charaPrefab;
private int timeCount;
void Update()
{
timeCount += 1;
if (timeCount % 200 == 0)
{
GameObject chara = Instantiate(charaPrefab, transform.position, Quaternion.identity);
Destroy(chara, 10.0f);
}
}
}

ARシューティングゲームの開発