C# Class LondonTower.LondonTowerGameManager

main class in london tower chaeck game statce, creat start, check end etc
Inheritance: UnityEngine.MonoBehaviour
Exibir arquivo Open project: BrainProject/UnityTemp

Public Properties

Property Type Description
levelSet int
minimap UnityEngine.GameObject
movingSphere bool
poles List
spherePrefab LondonToweSphereScript
spheres List
spheresIDColor Color>.Dictionary
state LondonTowerGameState
xmlLevels List

Public Methods

Method Description
CheckWin ( ) : bool

check if player win, after each sphere move

GameEnd ( ) : void
IsPoleFull ( int polePosition ) : bool

check if pole if full - then cant place any sphere on it, until at least one sphere is removed

OnTop ( int poleID, int orderInPole ) : bool

check if sphere is on top/on given order pole so it player can moved with it

SetLevel ( LondonToweGameStartWinData startData ) : void

set level from startData, doesn matter if it for expample/screen or for game

SetOnTop ( LondonToweSphereScript sphere ) : void

after sphere is place it check if the sphere is definetly on top of pole and if not t place the sphere on top

StartGame ( ) : void

call at level start, create all necessary steps to load level, take screen etc

Private Methods

Method Description
Start ( ) : void

Method Details

CheckWin() public method

check if player win, after each sphere move
public CheckWin ( ) : bool
return bool

GameEnd() public method

public GameEnd ( ) : void
return void

IsPoleFull() public method

check if pole if full - then cant place any sphere on it, until at least one sphere is removed
public IsPoleFull ( int polePosition ) : bool
polePosition int
return bool

OnTop() public method

check if sphere is on top/on given order pole so it player can moved with it
public OnTop ( int poleID, int orderInPole ) : bool
poleID int
orderInPole int
return bool

SetLevel() public method

set level from startData, doesn matter if it for expample/screen or for game
public SetLevel ( LondonToweGameStartWinData startData ) : void
startData LondonToweGameStartWinData
return void

SetOnTop() public method

after sphere is place it check if the sphere is definetly on top of pole and if not t place the sphere on top
public SetOnTop ( LondonToweSphereScript sphere ) : void
sphere LondonToweSphereScript
return void

StartGame() public method

call at level start, create all necessary steps to load level, take screen etc
public StartGame ( ) : void
return void

Property Details

levelSet public_oe static_oe property

data 1,2,3 choosing in main menu data 1,2,3,4 , random "level" from current dataset
public static int levelSet
return int

minimap public_oe property

public GameObject,UnityEngine minimap
return UnityEngine.GameObject

movingSphere public_oe property

public bool movingSphere
return bool

poles public_oe property

public List poles
return List

spherePrefab public_oe property

public LondonToweSphereScript spherePrefab
return LondonToweSphereScript

spheres public_oe property

public List spheres
return List

spheresIDColor public_oe static_oe property

parse string into color (string is from xml level files)
public static Dictionary spheresIDColor
return Color>.Dictionary

state public_oe static_oe property

current game state
public static LondonTowerGameState state
return LondonTowerGameState

xmlLevels public_oe property

public List xmlLevels
return List