Skip to content

Instantly share code, notes, and snippets.

View nickyeh97's full-sized avatar

Nick Yeh nickyeh97

  • Taiwan
View GitHub Profile
using UnityEngine;
namespace Vuforia
{
/// <summary>
/// A custom handler that implements the ITrackableEventHandler interface.
/// </summary>
public class FoodCheck : MonoBehaviour,
ITrackableEventHandler
{
private void OnTrackingFound()
{
Renderer[] rendererComponents = GetComponentsInChildren<Renderer>(true);
Collider[] colliderComponents = GetComponentsInChildren<Collider>(true);
// Enable rendering:
foreach (Renderer component in rendererComponents)
{
component.enabled = true;
}
private void OnTrackingFound()
{
Renderer[] rendererComponents = GetComponentsInChildren<Renderer>(true);
Collider[] colliderComponents = GetComponentsInChildren<Collider>(true);
// Enable rendering:
foreach (Renderer component in rendererComponents)
{
component.enabled = true;
}
private void OnTrackingFound()
{
Renderer[] rendererComponents = GetComponentsInChildren<Renderer>(true);
Collider[] colliderComponents = GetComponentsInChildren<Collider>(true);
// Enable rendering:
foreach (Renderer component in rendererComponents)
{
component.enabled = true;
}
private void Awake()//載入場景
{
if (instance != null)
{
DestroyImmediate(gameObject);
return;
}
DontDestroyOnLoad(gameObject);
instance = this;
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.SceneManagement;
using UnityEngine.UI;
public class PhotonManager : Photon.PunBehaviour
{
public static PhotonManager instance;
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class SpawnRandow : Photon.MonoBehaviour
{
[SerializeField]
private GameObject[] TeamA;
[SerializeField]
@nickyeh97
nickyeh97 / Dig_Progressing.cs
Created November 23, 2018 04:29
挖掘點的腳本 負責挖掘行為與進度
using System;
using System.Collections;
using System.Collections.Generic;
using UnityEditor;
using UnityEngine;
using UnityEngine.UI;
[RequireComponent(typeof(BoxCollider2D))]
public class Dig_Progressing : MonoBehaviour
{
@nickyeh97
nickyeh97 / cloudSettings
Last active May 18, 2022 05:16
Vs code 雲端同步
{"lastUpload":"2021-03-29T07:33:13.890Z","extensionVersion":"v3.4.3"}
using UnityEngine;
using System.Collections;
using DesignPattern_Bridge;
public class BridgeTest : MonoBehaviour {
void Start () {
UnitTest();
UnitTest_Window();
}