Skip to content

Instantly share code, notes, and snippets.

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class ShotPresent : MonoBehaviour
{
public GameObject present;
public GameObject shotPos;
Rigidbody rb;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PresentBomb : MonoBehaviour
{
private GameObject present;
private GameObject explosion;
private bool bomb = true;
AudioSource audioSource;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
public class DefeatCount : MonoBehaviour
{
public Text text;
private int count = 0;
private int monster = 0;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class Generator : MonoBehaviour
{
public GameObject greenMan;
private float time;
private float interval = 1f;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
[RequireComponent(typeof(CapsuleCollider))]
[RequireComponent(typeof(Rigidbody))]
[RequireComponent(typeof(NavMeshAgent))]
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class PresentFire : MonoBehaviour
{
//発射したいオブジェクトを入れる
public GameObject present;
Rigidbody rb;
//発射したい位置に置いた空のオブジェクトを入れる
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//Scene遷移に必要
using UnityEngine.SceneManagement;
public class SceneMove : MonoBehaviour
{
//Inspector上で遷移先の名前を入れる
public string sceneName;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
//TextなどのUIを使うのに必要
using UnityEngine.UI;
//オブジェクトにAudioSourceコンポーネントを追加
[RequireComponent(typeof(AudioSource))]
public class BGM : MonoBehaviour
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.AI;
[RequireComponent(typeof(CapsuleCollider))]
[RequireComponent(typeof(Rigidbody))]
[RequireComponent(typeof(NavMeshAgent))]
public class Opponent : MonoBehaviour
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
[RequireComponent(typeof(CapsuleCollider))]
[RequireComponent(typeof(Rigidbody))]
public class Player : MonoBehaviour
{
[SerializeField] float speed = 4f;