예제 #1
0
    public void RestoreState(object state)
    {
        CharRecord saveRecord = (CharRecord)state;

        hasMet            = saveRecord.hasMet;
        dateLevel         = saveRecord.dateLevel;
        inflatedDateLevel = saveRecord.inflatedDateLevel;
        bellyCapacity     = saveRecord.bellyCapacity;
    }
예제 #2
0
    public object CaptureState()
    {
        CharRecord saveRecord = new CharRecord();

        saveRecord.hasMet            = hasMet;
        saveRecord.dateLevel         = dateLevel;
        saveRecord.inflatedDateLevel = inflatedDateLevel;
        saveRecord.bellyCapacity     = bellyCapacity;
        return(saveRecord);
    }