mirror of
https://github.com/billsonnn/nitro-converter.git
synced 2024-11-22 23:50:52 +01:00
Added nopitch
This commit is contained in:
parent
b817561a85
commit
7303e35076
@ -5,6 +5,7 @@ import { IAssetDimension } from './IAssetDimension';
|
|||||||
import { IAssetPalette } from './IAssetPalette';
|
import { IAssetPalette } from './IAssetPalette';
|
||||||
import { ISpritesheetData } from './spritesheet';
|
import { ISpritesheetData } from './spritesheet';
|
||||||
import { IAssetVisualizationData } from './visualization';
|
import { IAssetVisualizationData } from './visualization';
|
||||||
|
import {ISoundSample} from "./ISoundSample";
|
||||||
|
|
||||||
export interface IAssetData {
|
export interface IAssetData {
|
||||||
type?: string;
|
type?: string;
|
||||||
@ -13,7 +14,7 @@ export interface IAssetData {
|
|||||||
logicType?: string;
|
logicType?: string;
|
||||||
maskType?: string;
|
maskType?: string;
|
||||||
credits?: string;
|
credits?: string;
|
||||||
soundSample?: number;
|
soundSample?: ISoundSample;
|
||||||
action?: { link?: string, startState?: number };
|
action?: { link?: string, startState?: number };
|
||||||
spritesheet?: ISpritesheetData;
|
spritesheet?: ISpritesheetData;
|
||||||
dimensions?: IAssetDimension;
|
dimensions?: IAssetDimension;
|
||||||
|
4
src/mapping/json/asset/ISoundSample.ts
Normal file
4
src/mapping/json/asset/ISoundSample.ts
Normal file
@ -0,0 +1,4 @@
|
|||||||
|
export interface ISoundSample {
|
||||||
|
id?: number,
|
||||||
|
noPitch?: boolean
|
||||||
|
}
|
@ -1,6 +1,7 @@
|
|||||||
import {IAssetData} from '../../json';
|
import {IAssetData} from '../../json';
|
||||||
import {LogicXML} from '../../xml';
|
import {LogicXML} from '../../xml';
|
||||||
import {Mapper} from './Mapper';
|
import {Mapper} from './Mapper';
|
||||||
|
import {ISoundSample} from "../../json/asset/ISoundSample";
|
||||||
|
|
||||||
export class LogicMapper extends Mapper
|
export class LogicMapper extends Mapper
|
||||||
{
|
{
|
||||||
@ -64,6 +65,12 @@ export class LogicMapper extends Mapper
|
|||||||
|
|
||||||
if(xml.credits !== undefined) output.credits = xml.credits.value;
|
if(xml.credits !== undefined) output.credits = xml.credits.value;
|
||||||
|
|
||||||
if(xml.soundSample !== undefined) output.soundSample = xml.soundSample.id;
|
if(xml.soundSample !== undefined)
|
||||||
|
{
|
||||||
|
output.soundSample = {
|
||||||
|
id: xml.soundSample.id,
|
||||||
|
noPitch: xml.soundSample.noPitch
|
||||||
|
};
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -1,6 +1,7 @@
|
|||||||
export class SoundSampleXML
|
export class SoundSampleXML
|
||||||
{
|
{
|
||||||
private readonly _id: number;
|
private readonly _id: number;
|
||||||
|
private readonly _noPitch: boolean;
|
||||||
|
|
||||||
constructor(xml: any)
|
constructor(xml: any)
|
||||||
{
|
{
|
||||||
@ -9,6 +10,7 @@ export class SoundSampleXML
|
|||||||
if(attributes !== undefined)
|
if(attributes !== undefined)
|
||||||
{
|
{
|
||||||
if(attributes.id !== undefined) this._id = parseInt(attributes.id);
|
if(attributes.id !== undefined) this._id = parseInt(attributes.id);
|
||||||
|
if(attributes.nopitch !== undefined) this._noPitch = attributes.nopitch === 'true';
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -16,4 +18,9 @@ export class SoundSampleXML
|
|||||||
{
|
{
|
||||||
return this._id;
|
return this._id;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get noPitch(): boolean
|
||||||
|
{
|
||||||
|
return this._noPitch;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user