示例#1
0
        private void HandleLoadedProperty(JsonTextReader reader, string propertyName, object readValue)
        {
            switch (propertyName)
            {
            case "Type":
                objectName = (string)readValue;
                break;

            case "GlobalID":
                this.GlobalID = (ushort)readValue;
                break;

            case "LocalID":
                this.LocalID = (ushort)readValue;
                break;

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

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

            case "Scale":
                transform.localScale = LoadManager.LoadVector(reader);
                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;
            }
        }