예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     goManager          = GameObject.Find("GameObjectManager");
     go                 = goManager.GetComponent <GOManagement>();
     dispManager        = go.mainUI.GetComponent <ClickManagement>();
     iconsTipManagement = go.mainUI.GetComponent <IconsTipManagement>();
 }
예제 #2
0
    // Start is called before the first frame update
    void Awake()
    {
        DontDestroyOnLoad(this);
        if (showInstance == null)
        {
            showInstance = this;
        }
        else
        {
            Destroy(gameObject);
        }
        SceneManager.sceneLoaded += OnSceneLoaded;


        backpackIcon       = GameObject.Find("BackpackIcon");
        spelltreeIcon      = GameObject.Find("SpelltreeIcon");
        talismanIcon       = GameObject.Find("TalismanIcon");
        memoryBookIcon     = GameObject.Find("MemoryBookIcon");
        characterStateIcon = GameObject.Find("CharacterStateIcon");
        obStateMemory      = GameObject.Find("ObStateMemory");
        obMemory           = obStateMemory.GetComponent <ObStateMemory>();
        backpack           = GameObject.Find("Backpack");
        memoryBook         = GameObject.Find("MemoryBook");
        itemHolder         = GameObject.Find("ItemHolder");
        itemPositionHolder = GameObject.Find("ItemPositionHolder");
        extraItemHolder    = GameObject.Find("ExtraItemHolder");
        noReferrence       = GameObject.Find("NoReferrence");
        mainUI             = GameObject.Find("MainUI");

        talisman = GameObject.Find("Talisman");

        spelltree = GameObject.Find("Spelltree");

        talisElementDesc = GameObject.Find("TElementDesc");
        talisElementText = GameObject.Find("W_TElementDesc");
        talisman1        = GameObject.Find("B_Talisman1");
        // spellDesc = GameObject.Find("spellDesc");
        secondLevelScroll = GameObject.Find("SLevelScroll");

        ob              = GameObject.Find("OB");
        characterState  = GameObject.Find("CharacterState");
        clickManagement = mainUI.GetComponent <ClickManagement>();

        characterCamera = GameObject.Find("Main Camera");

        blackSceneDisp  = GameObject.Find("TemporaryBlackScene");
        blackScene      = blackSceneDisp.GetComponent <BlackScene>();
        inGameMenu      = GameObject.Find("InGameMenu");
        sceneTransition = GameObject.Find("SceneTransition");
        levelLoader     = sceneTransition.GetComponent <LevelLoader>();

        iconsTip = GameObject.Find("IconsTip");

        // 设置不同场景的zoom范围
        clickManagement.zoomInAllowedSceneWithRange = new Dictionary <string, (float, float)>();
        // clickManagement.zoomInAllowedSceneWithRange.Add("Tutorial (With UI)", (-20, -10));
        clickManagement.zoomInAllowedSceneWithRange.Add("WaterLevelCave", (-20, -10));
        clickManagement.zoomInAllowedSceneWithRange.Add("WaterLevelGround", (-20, -10));
    }
예제 #3
0
    private void Start()
    {
        go = GameObject.Find("GameObjectManager").GetComponent <GOManagement>();

        // This would cast rays only against colliders in layer 8.
        // But instead we want to collide against everything except layer 8. The ~ operator does this, it inverts a bitmask.
        layerMask = 1 << 8;
        layerMask = ~layerMask;

        dispManager = go.mainUI.GetComponent <ClickManagement>();
        // ob = go.ob.GetComponent<ObManagement>();
    }
예제 #4
0
    void Start()
    {
        goManager = GameObject.Find("GameObjectManager");
        go        = goManager.GetComponent <GOManagement>();

        dispManager      = go.mainUI.GetComponent <ClickManagement>();
        spelltreeManager = go.spelltree.GetComponent <SpelltreeManager>();
        display          = go.talisman;
        backpack         = go.backpack.GetComponent <Backpack>();
        textbox          = go.talisElementDesc;
        eleName          = go.talisElementText.GetComponent <Text>();
        sLevelScroll     = go.secondLevelScroll;

        sLevelScroll.SetActive(false);
        display.SetActive(false);
        textbox.SetActive(false);
    }
예제 #5
0
    // Start is called before the first frame update
    void Start()
    {
        go = GameObject.Find("GameObjectManager").GetComponent <GOManagement>();

        spell         = false;
        taoBookOpened = false;

        // s = GameObject.Find("MainUI").GetComponent<SpellTreeManager>();
        itemOnPuzzle = new Hashtable();
        itemOnPuzzle.Add("重塑符", "Crutch,BurntCharcoal,PickBurntCoal");
        itemOnPuzzle.Add("阳火符", "OilLight,NewWood");
        itemOnPuzzle.Add("现元符", "WCPlaceholder");
        itemOnPuzzle.Add("Earth Key", "EarthPortal");
        itemOnPuzzle.Add("Changable Soil", "River,Flowerpot,Flowerpot cld,FutureRock,EarthPortal");
        itemOnPuzzle.Add("PickBurntCoal", "BigStovehole,SmallStovehole");

        // talisDisp = GameObject.FindObjectOfType<TalismanManager>();
        dispManager = GameObject.FindObjectOfType <ClickManagement>();
    }