Beispiel #1
0
        // Use this for initialization
        void Start()
        {
            _jsonParser        = new JSONParser();
            _gameObjectCreator = ScriptableObject.CreateInstance("GameObjectCreator") as GameObjectCreator;

            string path = "Assets/Resources/Project.json"; //TODO: Change this so filename is more dynamic

            _streamReader = new StreamReader(path);
            SetupWorld();
        }
Beispiel #2
0
        public Room(ClassObject classObject, GameObject roomGO)
        {
            this._entryCounter = 0;
            this.RoomGO        = roomGO;
            this.Info          = classObject;

            this.RoomGO.transform.position = new Vector3(0, 0, 0);
            this.RoomGO.name = Info.name;
            int rels = GameObjectCreator.CountRels(classObject);

            _doorsNum = rels > 4 ? 4 : rels;
        }