Click or drag to resize
CounterRef Class
This class provides a kind of indirect reference to a counter for the purposes of saving and loading counter values in a SaveUnit.
Inheritance Hierarchy
SystemObject
  (Default Namespace)CounterRef

Namespace: (Default Namespace)
Assembly: Default (in Default.exe) Version: 1.0.0.0
Syntax
C#
[SerializableAttribute]
public class CounterRef : ISerializable

The CounterRef type exposes the following members.

Constructors
  NameDescription
Public methodCounterRef
Initializes a new instance of the CounterRef class
Top
Methods
  NameDescription
Public methodEquals
Determines whether the specified object is equal to the current object.
(Inherited from Object.)
Public methodGetHashCode
Serves as the default hash function.
(Inherited from Object.)
Public methodGetObjectData
Public methodGetType
Gets the Type of the current instance.
(Inherited from Object.)
Public methodToString
Returns a string that represents the current object.
(Inherited from Object.)
Top
Fields
  NameDescription
Public fieldcounterName
Public fieldinstance
Top
Remarks
Since counters are global objects, it doesn't work well to add a counter directly to the save unit because then loading the save unit will leave the loaded counter values contained in the SaveUnit object. But by providing this wrapper that has code specifically for loading ans storing counters, the value of the global counters can automatically be linked to those in a SaveUnit.
See Also