예제 #1
0
 private void OnDestroy()
 {
     if (Instance == this)
     {
         Instance = null;
     }
 }
예제 #2
0
    public void SetUpEssentialGameObjects()
    {
        Player     = Instantiate(playerPrefab);
        MainCamera = Instantiate(mainCameraPrefab);
        Canvas     = Instantiate(canvasPrefab);

        camScript        = MainCamera.GetComponent <Camera>();
        canvasController = Canvas.GetComponent <UICanvasController>();
    }
예제 #3
0
 // Use this for initialization
 void Start()
 {
     _instance       = this;
     Hope.maxValue   = GameSettingsManager.LevelStartingHope;
     Hope.value      = GameSettingsManager.LevelStartingHope;
     Horror.maxValue = GameSettingsManager.LevelMaxHorror;
     Horror.value    = 0;
     GiftsDeliveredTextObject.text = "0/15";
     CurrentGiftsTextObject.text   = "0";
 }
예제 #4
0
    private void Awake()
    {
        if (Instance == null)
        {
            Instance = this;
        }

        else
        {
            Destroy(gameObject);
            return;
        }
    }
예제 #5
0
        //Get All UICanvas ,when Forbiddle UI this Will Be Use
        public void RegistCanvas(UICanvasController canvas, bool isRegist)
        {
            if (isRegist)
            {
                if (m_AllCanvas.Contains(canvas))
                {
                    return;                               //   Debug.Log("�ظ�ע��" + canvas);
                }
                m_AllCanvas.Add(canvas);
                return;
            }//if

            if (m_AllCanvas.Contains(canvas))
            {
                m_AllCanvas.Remove(canvas);
            }
        }