C# Class Liveable, Unity2d-Game

Inheritance: BaseObj
显示文件 Open project: sagivo/Unity2d-Game

Public Properties

Property Type Description
IsSelectable bool
OnDie System.Action
OnHealthChanged System.Action
OnHit System.Action
OnRepairEnd System.Action
OnRepairStart System.Action
OnSelected System.Action
OnStatusChange System.Action
OnUpgraded System.Action
buildGameObjectsPerLevel GameObject[]
healthBarYMargin float
healthPerLevel int[]
level int
speedPerLevel float[]
spritesPerLevel Sprite[]
status StatusType,

Protected Properties

Property Type Description
animator Animator
lookRight bool
spriteRenderer SpriteRenderer

Public Methods

Method Description
OnTriggerEnter2D ( Collider2D other ) : void
Select ( ) : void
build ( ) : void
changeStatus ( StatusType, newStatus ) : void
decHealth ( int by ) : void
loadDynamicGO ( GameObject go ) : void
setInactive ( ) : void
switchBackToOriginalColor ( ) : void
upgradeDone ( ) : void

Protected Methods

Method Description
Awake ( ) : void
Flip ( ) : void
Start ( ) : void
setValForAnimator ( string str, float val ) : void

Method Details

Awake() protected method

protected Awake ( ) : void
return void

Flip() protected method

protected Flip ( ) : void
return void

OnTriggerEnter2D() public method

public OnTriggerEnter2D ( Collider2D other ) : void
other UnityEngine.Collider2D
return void

Select() public method

public Select ( ) : void
return void

Start() protected method

protected Start ( ) : void
return void

build() public method

public build ( ) : void
return void

changeStatus() public method

public changeStatus ( StatusType, newStatus ) : void
newStatus StatusType,
return void

decHealth() public method

public decHealth ( int by ) : void
by int
return void

loadDynamicGO() public method

public loadDynamicGO ( GameObject go ) : void
go GameObject
return void

setInactive() public method

public setInactive ( ) : void
return void

setValForAnimator() protected method

protected setValForAnimator ( string str, float val ) : void
str string
val float
return void

switchBackToOriginalColor() public method

public switchBackToOriginalColor ( ) : void
return void

upgradeDone() public method

public upgradeDone ( ) : void
return void

Property Details

IsSelectable public_oe property

public bool IsSelectable
return bool

OnDie public_oe property

public Action,System OnDie
return System.Action

OnHealthChanged public_oe property

public System.Action OnHealthChanged
return System.Action

OnHit public_oe property

public System.Action OnHit
return System.Action

OnRepairEnd public_oe property

public System.Action OnRepairEnd
return System.Action

OnRepairStart public_oe property

public System.Action OnRepairStart
return System.Action

OnSelected public_oe property

public Action,System OnSelected
return System.Action

OnStatusChange public_oe property

public System.Action OnStatusChange
return System.Action

OnUpgraded public_oe property

public Action,System OnUpgraded
return System.Action

animator protected_oe property

protected Animator animator
return Animator

buildGameObjectsPerLevel public_oe property

public GameObject[] buildGameObjectsPerLevel
return GameObject[]

healthBarYMargin public_oe property

public float healthBarYMargin
return float

healthPerLevel public_oe property

public int[] healthPerLevel
return int[]

level public_oe property

public int level
return int

lookRight protected_oe property

protected bool lookRight
return bool

speedPerLevel public_oe property

public float[] speedPerLevel
return float[]

spriteRenderer protected_oe property

protected SpriteRenderer spriteRenderer
return SpriteRenderer

spritesPerLevel public_oe property

public Sprite[] spritesPerLevel
return Sprite[]

status public_oe property

public StatusType, status
return StatusType,