Exemplo n.º 1
0
        public void RefreshState()
        {
            var          igsd        = this.Root.Game.IngameState.Data;
            AreaTemplate clientsArea = igsd.CurrentArea;
            int          curAreaHash = igsd.CurrentAreaHash;

            if (CurrentArea != null && curAreaHash == CurrentArea.Hash)
            {
                return;
            }

            CurrentArea = new AreaInstance(clientsArea, curAreaHash, igsd.CurrentAreaLevel);
            this.OnAreaChange(this);
        }
Exemplo n.º 2
0
        public void RefreshState()
        {
            GController.Cache.UpdateCache();
            var          ingameData  = GController.Game.IngameState.Data;
            AreaTemplate clientsArea = ingameData.CurrentArea;
            var          curAreaHash = ingameData.CurrentAreaHash;

            if (CurrentArea != null && curAreaHash == CurrentArea.Hash)
            {
                return;
            }

            CurrentArea = new AreaInstance(clientsArea, curAreaHash, ingameData.CurrentAreaLevel);
            OnAreaChange?.Invoke(this);
        }
Exemplo n.º 3
0
        // dict is wrong 'cause hash is wrong
        // public Dictionary<int, AreaInstance> AreasVisited = new Dictionary<int, AreaInstance>();
        public void RefreshState()
        {
            var igsd = this.Root.Internal.Game.IngameState.Data;
            AreaTemplate clientsArea = igsd.CurrentArea;
            int curAreaHash = igsd.CurrentAreaHash;

            if (CurrentArea != null && curAreaHash == CurrentArea.Hash)
                return;

            // try to find the new area in our dictionary
            AreaInstance //area;
            //if (!AreasVisited.TryGetValue(curAreaHash, out area)) {
                area = new AreaInstance(clientsArea, curAreaHash, igsd.CurrentAreaLevel);
            // }

            CurrentArea = area;

            this.OnAreaChange(this);
        }
Exemplo n.º 4
0
        // dict is wrong 'cause hash is wrong
        // public Dictionary<int, AreaInstance> AreasVisited = new Dictionary<int, AreaInstance>();

        public void RefreshState()
        {
            var          igsd        = this.Root.Internal.Game.IngameState.Data;
            AreaTemplate clientsArea = igsd.CurrentArea;
            int          curAreaHash = igsd.CurrentAreaHash;

            if (CurrentArea != null && curAreaHash == CurrentArea.Hash)
            {
                return;
            }

            // try to find the new area in our dictionary
            AreaInstance             //area;
            //if (!AreasVisited.TryGetValue(curAreaHash, out area)) {
                area = new AreaInstance(clientsArea, curAreaHash, igsd.CurrentAreaLevel);

            // }

            CurrentArea = area;

            this.OnAreaChange(this);
        }