Changeset 161 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures/events/AudioEvent.java


Ignore:
Timestamp:
12/04/2019 02:43:12 PM (6 years ago)
Author:
sdanthin
Message:

AudioEvent?.java CHPRadioEvent.java added corresponding functions to match interface and began implementing an ID system.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/structures/events/AudioEvent.java

    r76 r161  
    2727        super(ScriptEventType.AUDIO_EVENT); 
    2828    } 
     29     
     30    /** 
     31     * Constructor with ID 
     32     * @param id AudioEvent ID 
     33     */ 
     34    public AudioEvent(String id) 
     35    { 
     36        super(ScriptEventType.AUDIO_EVENT); 
     37        this.id = id; 
     38    } 
    2939 
    3040    /** 
     
    3747     */ 
    3848    public String audioPath = ""; 
    39  
     49     
     50    /** 
     51     * id represents the audio file name that corresponds with the event 
     52     */ 
     53     public String id = ""; 
     54      
     55    /** 
     56     * sets the audio path relative to the running directory. 
     57     * @param f filename 
     58     */ 
     59     
     60    
     61     
     62    public void setAudioFilePathRelative(String f) 
     63    { 
     64        audioPath = "audio/" + f + ".mp3"; 
     65    } 
     66     
     67    public void setAudioFilePathRelative() 
     68    { 
     69        audioPath = "audio/" + id + ".mp3"; 
     70    } 
     71     
    4072    @Override 
    4173    public String toXML() 
Note: See TracChangeset for help on using the changeset viewer.