下方的那個HoleController,出錯(錯誤 1 未能找到型別或命名空間名稱“Assets”(是否缺少 using 指令或程式集參考?) )
(2錯誤 未能找到型別或命名空間名稱“HoleController”(是否缺少 using 指令或程式集參考?))

using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using Assets.DEvelop_scripts;
public class Gamecontroller : MonoBehaviour
{
#region Sigleton
public static Gamecontroller _instance;
public Gamecontroller GetInstance
{
get { return _instance; }
}
void Awake()
{
_instance = this;
}
#endregion
//全域唯一變數
private GameState this_State=GameState.Play;
public GameState GetState
{
set { this_State = value; }
get { return this_State; }
}
private GameState lastState;
private HoleController[] HoleController;
void Start()
{
lastState = this_State;
SendNotice();
}
void Update()
{
if (lastState != this_State)
SendNotice();
}
void SendNotice()
{
if(this_State != GameState.Play)
{
for(int i=0;i<HoleController.Length;i++)
HoleController[i].StartSpawn();
}
}
public void ChangePlay()
{
this_State = GameState.Play;
}
public void ChangeEnd()
{
this_State = GameState.End;
}
}
uj5u.com熱心網友回復:

這是代碼的圖片版。希望大神解釋的詳細一點
轉載請註明出處,本文鏈接:https://www.uj5u.com/qita/44091.html
標籤:Unity3D
