コード例 #1
0
    public override void Init(GameObject parentObject)
    {
        ARManager.SetPlanesActive(false); //Incase theres existing planes
        ARManager.SetPlaneManagerActive(false);

        instructionUI.SetActive(true);
        mainMenuButton.SetActive(false);

        if (minionPrefabs != null)
        {
            foreach (Minion m in minionPrefabs)
            {
                minionDictionary.Add(m.gameObject.name, m.gameObject);
            }
        }

        //ARDebug.Log("Loaded prefabs", 5);

        imageManager = FindObjectOfType <ARTrackedImageManager>();
        if (imageManager == null)
        {
            imageManager = ARManager.arSessionOrigin.gameObject.AddComponent <ARTrackedImageManager>();
            imageManager.referenceLibrary        = ContentLoader.LoadReferenceLibrary();
            imageManager.maxNumberOfMovingImages = 2;
            //imageManager.trackedImagePrefab = spawnObject;
        }

        imageManager.enabled = true;
        imageManager.trackedImagesChanged += UpdateImage;

        //ARDebug.Log("Finish Init", 5);
    }
コード例 #2
0
    public void BackToMainMenu()
    {
        DestroyGameSessionObjects();

        ARManager.SetPlanesInvisible(false);
        ARManager.SetPlanesActive(false);
        ARManager.SetPlaneManagerActive(false);

        MenuManager.instance.SpawnMenu(eMenus.MAIN_MENU);
        GameModeManager.instance.DestroyActiveGameMode();
    }
コード例 #3
0
    private void OnDisable()
    {
        UIManager.onDrawModeButtonPressed     -= ChangeDrawState;
        UIManager.onBlockDisplayButtonPressed -= ChangeBlock;
        UIManager.onEnemyDisplayButtonPressed -= ChangeEnemy;

        if (worldZeroBlock != null)
        {
            Destroy(worldZeroBlock);
        }

        ARManager.SetPlanesInvisible(true);
        ARManager.SetPlanesActive(false);
        ARManager.SetPlaneManagerActive(false);
    }
コード例 #4
0
    public void GoToMainMenu()
    {
        UIManager.onDrawModeButtonPressed     -= ChangeDrawState;
        UIManager.onBlockDisplayButtonPressed -= ChangeBlock;

        if (worldZeroBlock != null)
        {
            Destroy(worldZeroBlock);
        }

        ARManager.SetPlanesActive(false);
        ARManager.SetPlaneManagerActive(false);

        MenuManager.instance.SpawnMenu(eMenus.MAIN_MENU);
        GameModeManager.instance.DestroyActiveGameMode();
    }