示例#1
0
        protected override void HandleLoadedProperty(JsonTextReader reader, string propertyName, object readValue)
        {
            base.HandleLoadedProperty(reader, propertyName, readValue);
            switch (propertyName)
            {
            case "NeedsBuilding":
                _needsBuilding = (bool)readValue;
                break;

            case "PlayingArea":
                (Agent as RTSAgent).SetPlayingArea(LoadManager.LoadRect(reader));
                break;

            default: break;
            }
        }
示例#2
0
        protected override void HandleLoadedProperty(JsonTextReader reader, string propertyName, object readValue)
        {
            base.HandleLoadedProperty(reader, propertyName, readValue);
            switch (propertyName)
            {
            case "Destination":
                Destination = LoadManager.LoadVector2d(reader);
                break;

            case "TargetVersion":
                targetVersion = (uint)readValue;
                break;

            case "AttackCount":
                attackCount = (long)readValue;
                break;

            case "AttackMoving":
                IsAttackMoving = (bool)readValue;
                break;

            case "TargetID":
                loadedTargetId = (int)(System.Int64)readValue;
                break;

            case "Focused":
                isFocused = (bool)readValue;
                break;

            case "InRange":
                inRange = (bool)readValue;
                break;

            case "SearchCount":
                searchCount = (int)readValue;
                break;

            case "FastRangeToTarget":
                fastRangeToTarget = (long)readValue;
                break;

            default: break;
            }
        }
        protected override void HandleLoadedProperty(JsonTextReader reader, string propertyName, object readValue)
        {
            base.HandleLoadedProperty(reader, propertyName, readValue);
            switch (propertyName)
            {
            case "SpawnPoint":
                spawnPoint = LoadManager.LoadVector(reader);
                break;

            case "RallyPoint":
                rallyPoint = LoadManager.LoadVector(reader);
                break;

            case "FlagState":
                _flagState = WorkManager.GetFlagState((string)readValue);
                break;

            default: break;
            }
        }
示例#4
0
        protected override void HandleLoadedProperty(JsonTextReader reader, string propertyName, object readValue)
        {
            base.HandleLoadedProperty(reader, propertyName, readValue);
            switch (propertyName)
            {
            case "SpawnProgress":
                currentSpawnProgress = (long)readValue;
                break;

            case "SpawnCount":
                spawnCount = (long)readValue;
                break;

            case "SpawnQueue":
                spawnQueue = new Queue <string>(LoadManager.LoadStringArray(reader));
                break;

            default: break;
            }
        }
示例#5
0
        protected override void HandleLoadedProperty(JsonTextReader reader, string propertyName, object readValue)
        {
            base.HandleLoadedProperty(reader, propertyName, readValue);
            switch (propertyName)
            {
            case "MyMovementGroupID":
                MyMovementGroupID = (int)readValue;
                break;

            case "FormationMoving":
                IsFormationMoving = (bool)readValue;
                break;

            case "Moving":
                IsMoving = (bool)readValue;
                break;

            case "HasPath":
                hasPath = (bool)readValue;
                break;

            case "StraightPath":
                straightPath = (bool)readValue;
                break;

            case "ViableDestination":
                viableDestination = (bool)readValue;
                break;

            case "PathIndex":
                pathIndex = (int)readValue;
                break;

            case "StoppedTime":
                StoppedTime = (int)readValue;
                break;

            case "TargetPos":
                targetPos = LoadManager.LoadVector2d(reader);
                break;

            case "Destination":
                Destination = LoadManager.LoadVector2d(reader);
                break;

            case "Arrived":
                Arrived = (bool)readValue;
                break;

            case "AveragePosition":
                AveragePosition = LoadManager.LoadVector2d(reader);
                break;

            case "Decellerating":
                decellerating = (bool)readValue;
                break;

            case "LastTargetPos":
                lastTargetPos = LoadManager.LoadVector2d(reader);
                break;

            case "TargetDirection":
                targetDirection = LoadManager.LoadVector2d(reader);
                break;

            case "MovementDirection":
                movementDirection = LoadManager.LoadVector2d(reader);
                break;

            default: break;
            }
        }