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);
}
}
}


【2018版】AR_Project(全9回)
1 | AR版ピタゴラスイッチを作る |
2 | キャラクターをAR鑑賞する |
3 | ARシューティングゲームの開発 |
4 | キャラを破壊する |
5 | オリジナルのカーソルを作成する |
6 | カウンターを作成する |
7 | ★チャレンジ課題 |





キャラクターを動かす
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シューティングゲームの開発