Exemple #1
0
    public void NewOverworld(DoorToLocation door, Vector3 offset)
    {
        GameScene             gs  = door.GetTargetScene();
        DatabaseSceneEntrance dse = gs.GuidToEntrance(door.targetGuidString);

        NewOverworldAt
        (
            gs.name,
            dse.position + offset,
            dse.facingDirection,
            !door.stopOnTransition,
            false
        );
    }
Exemple #2
0
    private void OnEnable()
    {
        door = (DoorToLocation)target;
        GameObject sceneatt = GameObject.Find("SceneAttributes");

        if (sceneatt != null)
        {
            door.attributes = sceneatt.GetComponent <SceneAttributes>();
            door.attributes.RefreshDoors();
            if (door.GetTargetScene() != null)
            {
                fallbackIndex = door.GetTargetScene().EntranceGuidToInt(door.targetGuidString);
            }
        }
    }
Exemple #3
0
    public void RefreshDoors()
    {
        GameObject[] doors = GameObject.FindGameObjectsWithTag("Door");
        GetCurrentScene().entranceList.Clear();
        database.GetScenesArray();

        foreach (GameObject door in doors)
        {
            DoorToLocation        d   = door.GetComponent <DoorToLocation>();
            DatabaseSceneEntrance dse = new DatabaseSceneEntrance();
            dse.name            = d.name;
            dse.facingDirection = d.exitDirection;
            dse.position        = Vector3Int.FloorToInt(d.transform.position);
            dse.guid            = d.GetComponent <GuidComponent>().GetGuid();
            dse.guidString      = dse.guid.ToString();
            GetCurrentScene().entranceList.Add(dse);
        }

        doorArray = GetCurrentScene().GetEntrancesArray();
    }