C# Class Herbivore.SimpleHerbivore

Inheritance: OrganismBase.Animal
Show file Open project: eugeniomiro/Terrarium

Public Methods

Method Description
DeserializeAnimal ( MemoryStream m ) : void

This gets called when you are instantiated again after being saved. You get a chance to pull out any information that you put into the stream when you were saved

SerializeAnimal ( MemoryStream m ) : void

This gets called whenever your animal is being saved -- either the game is closing or you are being teleported. Store anything you want to remember when you are instantiated again in the stream.

Protected Methods

Method Description
Initialize ( ) : void

Set up any event handlers that we want when first initialized

Private Methods

Method Description
IdleEvent ( object sender, IdleEventArgs e ) : void
LoadEvent ( object sender, LoadEventArgs e ) : void

First event fired on an organism each turn

ScanForTargetPlant ( ) : bool

Method Details

DeserializeAnimal() public method

This gets called when you are instantiated again after being saved. You get a chance to pull out any information that you put into the stream when you were saved
public DeserializeAnimal ( MemoryStream m ) : void
m System.IO.MemoryStream
return void

Initialize() protected method

Set up any event handlers that we want when first initialized
protected Initialize ( ) : void
return void

SerializeAnimal() public method

This gets called whenever your animal is being saved -- either the game is closing or you are being teleported. Store anything you want to remember when you are instantiated again in the stream.
public SerializeAnimal ( MemoryStream m ) : void
m System.IO.MemoryStream
return void