Changeset 40 in tmcsimulator-scriptbuilder for trunk/src/scriptbuilder/structures/ScriptIncident.java


Ignore:
Timestamp:
08/04/2017 03:56:09 PM (9 years ago)
Author:
bmcguffin
Message:

Added handling methods for injecting CAD data into timeslices.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/scriptbuilder/structures/ScriptIncident.java

    r38 r40  
    269269    } 
    270270 
     271    void insertCadData(long currentEventTime, CadData cad) 
     272    { 
     273        if(number == 100) 
     274        { 
     275            System.out.println("\n\n~~~INCIDENT 100 GOT HERE~~~\n"); 
     276        } 
     277         
     278         
     279        int time = (int) currentEventTime; 
     280 
     281        TimeSlice slice; 
     282 
     283        if (slices.get(time) == null) 
     284        { 
     285            slices.put(time, new TimeSlice(time, this)); 
     286        } 
     287        slice = slices.get(time); 
     288        slice.cadData = cad; 
     289    } 
     290 
    271291    /** 
    272292     * Update the offset and apparent length of this incident. The offset is the 
Note: See TracChangeset for help on using the changeset viewer.