MoodSwingGame.MSChangeableBuilding.load C# (CSharp) Method

load() public method

public load ( StreamReader sr ) : void
sr System.IO.StreamReader
return void
        public override void load(StreamReader sr)
        {
            string state = sr.ReadLine();
            if (state.Equals("DONE")) this.State = MSChangeableBuildingState.DONE;
            else if (state.Equals("IDLE")) this.State = MSChangeableBuildingState.IDLE;
            else if (state.Equals("TRANSFORMING")) this.State = MSChangeableBuildingState.TRANSFORMING;
            else if (state.Equals("WAITING")) this.State = MSChangeableBuildingState.WAITING;

            startTime = Int32.Parse(sr.ReadLine());
            timeCount = Int32.Parse(sr.ReadLine());
            expectedWorkers = Int32.Parse(sr.ReadLine());
            buildTime = Int32.Parse(sr.ReadLine());

            string checker = sr.ReadLine();
            if (checker.Equals("go"))
            {
                futureSelf = MSTileFactory.loadMSTile(sr);
            }
        }