Otter  0.9.88
2d Game Development Framework based on SFML.Net
 All Classes Namespaces Functions Variables Enumerations Properties
Otter.Session Class Reference

Class that represents a player session. Use this for maintaining and using information about a player. For example a two player game might have two sessions, one for each player, each with their own controls configured and save data. More...

Public Member Functions

GetController< T > ()
 Gets the Controller as a specific type of Controller. More...
 
 Session (Game game, string name)
 Create a new Session. More...
 

Static Public Member Functions

static Session Create (string name)
 Create a new Session using the current Game.Instance. More...
 
static Session Create (Enum name)
 

Public Attributes

string Name = ""
 The name of this Session. This is important as it will determine the name of save data files and you can also find a session by name. More...
 
Controller Controller = new Controller()
 The Controller to use for this Session. More...
 

Properties

int Id [get, set]
 The Id of this session in the Game. More...
 
DataSaver Data [get, set]
 
Game Game [get, set]
 The game that manages this session. More...
 

Detailed Description

Class that represents a player session. Use this for maintaining and using information about a player. For example a two player game might have two sessions, one for each player, each with their own controls configured and save data.

Constructor & Destructor Documentation

Otter.Session.Session ( Game  game,
string  name 
)

Create a new Session.

Parameters
gameThe Game that the session is tied to.

Member Function Documentation

static Session Otter.Session.Create ( string  name)
static

Create a new Session using the current Game.Instance.

Returns
T Otter.Session.GetController< T > ( )

Gets the Controller as a specific type of Controller.

Template Parameters
TThe type of Controller.
Returns
The Controller as type T.
Type Constraints
T :Controller 

Member Data Documentation

Controller Otter.Session.Controller = new Controller()

The Controller to use for this Session.

string Otter.Session.Name = ""

The name of this Session. This is important as it will determine the name of save data files and you can also find a session by name.

Property Documentation

Game Otter.Session.Game
getset

The game that manages this session.

int Otter.Session.Id
getset

The Id of this session in the Game.


The documentation for this class was generated from the following file: