SnL Classen Referenz: Unterschied zwischen den Versionen

Aus Hackerspace Ffm
Wechseln zu: Navigation, Suche
(Target.py)
(Class: GameWorld)
 
(11 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt)
Zeile 1: Zeile 1:
=Target.py=
+
== GameEngine.py ==
 +
 
 +
==== Class: GameEngine ====
 
{| class="wikitable"
 
{| class="wikitable"
|+TargetHitRecord
 
 
|-
 
|-
 
|colspan=3|Properties
 
|colspan=3|Properties
Zeile 9: Zeile 10:
 
|Description
 
|Description
 
|-
 
|-
|Butter
+
|colspan=3|Methods
|Eis
+
|-
|Dings
+
|Name
 +
|Values
 +
|Description
 +
|-
 +
|__init__
 +
|self,gameHotLine, gameWorld, gameScreen
 +
|
 +
|-
 +
|MainLoop
 +
|self
 +
|
 +
|-
 +
|LoopIntro
 +
|self
 +
|
 +
|-
 +
|GameStart
 +
|self
 +
|
 +
|-
 +
|LoopGamePlay
 +
|self
 +
|
 +
|-
 +
|DecodeHit
 +
|self,hitCode
 +
|
 +
|-
 +
|GetRandomTarget
 +
|self,excludeTarget
 +
|
 +
|-
 +
|GameTargetContoller
 +
|self
 +
|
 +
|-
 +
|GameOver
 +
|self
 +
|
 +
|-
 +
|TurnOffAllTargets
 +
|self
 +
|
 +
|-
 +
|HitMeAllTargets
 +
|self
 +
|
 +
|-
 +
|PollTargetBuffer
 +
|self
 +
|
 +
|-
 +
|}
 +
 
 +
 
 +
== SerialHalfDuplex.py ==
 +
 
 +
==== Class: SerialHalfDuplex ====
 +
{| class="wikitable"
 +
|-
 +
|colspan=3|Properties
 +
|-
 +
|Name
 +
|Value
 +
|Description
 +
|-
 +
|colspan=3|Methods
 +
|-
 +
|Name
 +
|Values
 +
|Description
 +
|-
 +
|initSerialGPIO
 +
|self
 +
|
 +
|-
 +
|configSerial
 +
|self,device,baud
 +
|
 +
|-
 +
|Init
 +
|self
 +
|
 +
|-
 +
|SetBuffer
 +
|self,buffer
 +
|
 +
|-
 +
|WriteBuffer
 +
|self
 +
|
 +
|-
 +
|Ping
 +
|self,ping
 +
|
 +
|-
 +
|PingPong
 +
|self,ping
 +
|
 +
|-
 +
|ReadLine
 +
|self
 +
|
 +
|-
 +
|Close
 +
|self
 +
|
 +
|-
 +
|}
 +
 
 +
== GameWorld.py ==
 +
 
 +
==== Class: GameWorld ====
 +
{| class="wikitable"
 +
|-
 +
|colspan=3|Properties
 +
|-
 +
|Name
 +
|Value
 +
|Description
 +
|-
 +
|colspan=3|Methods
 +
|-
 +
|Name
 +
|Values
 +
|Description
 +
|-
 +
|__init__
 +
|self
 +
|
 +
|-
 +
|AddTargetGroup
 +
|self,targetGroupID,targetGroupZIndex
 +
|
 +
|-
 +
|AddLaserWeapon
 +
|self,laserWeapon
 +
|
 +
|-
 +
|CollectTargetSerialBuffersAsList
 +
|self
 +
|Sammelt von ALLEN den TargetGroups die Nachrichten die über den bus gesendet werden sollen.
 +
|-
 +
|UpdateTargets
 +
|self
 +
|Führt bei ALLEN TargetGroups die UpdateTargets Methode.
 +
|-
 +
|GetTargetGroupByID
 +
|self,targetGroupID
 +
|
 +
|-
 +
|}
 +
 
 +
== TargetGroup.py ==
 +
 
 +
==== Class: TargetGroup ====
 +
{| class="wikitable"
 +
|-
 +
|colspan=3|Properties
 +
|-
 +
|Name
 +
|Value
 +
|Description
 +
|-
 +
|colspan=3|Methods
 +
|-
 +
|Name
 +
|Values
 +
|Description
 +
|-
 +
|__init__
 +
|self,gameWorld,targetGroupID,targetGroupZIndex
 +
|
 +
|-
 +
|AddTarget
 +
|self,targetID,targetZIndex
 +
|
 +
|-
 +
|CollectSerialBufferFromTargetsAsList
 +
|self
 +
|Sammelt von ALLEN den Targets die Nachrichten die über den bus gesendet werden sollen.
 +
|-
 +
|UpdateTargets
 +
|self
 +
|Ruft bei ALLEN Targets die Update Methode auf.
 +
|-
 +
|GetTargetByID
 +
|self,GTBI_id
 +
|
 +
|-
 +
|}
 +
 
 +
== Target.py ==
 +
 
 +
==== Class: TargetHitRecord ====
 +
{| class="wikitable"
 +
|colspan=3|Properties
 +
|-
 +
|Name
 +
|Value
 +
|Description
 
|-
 
|-
 
|colspan=3|Methods
 
|colspan=3|Methods
Zeile 25: Zeile 226:
 
|}
 
|}
  
 +
==== Class: Target ====
 
{| class="wikitable"
 
{| class="wikitable"
|+Target
 
 
|-
 
|-
 
|colspan=3|Properties
 
|colspan=3|Properties

Aktuelle Version vom 31. Dezember 2015, 01:18 Uhr

GameEngine.py

Class: GameEngine

Properties
Name Value Description
Methods
Name Values Description
__init__ self,gameHotLine, gameWorld, gameScreen
MainLoop self
LoopIntro self
GameStart self
LoopGamePlay self
DecodeHit self,hitCode
GetRandomTarget self,excludeTarget
GameTargetContoller self
GameOver self
TurnOffAllTargets self
HitMeAllTargets self
PollTargetBuffer self


SerialHalfDuplex.py

Class: SerialHalfDuplex

Properties
Name Value Description
Methods
Name Values Description
initSerialGPIO self
configSerial self,device,baud
Init self
SetBuffer self,buffer
WriteBuffer self
Ping self,ping
PingPong self,ping
ReadLine self
Close self

GameWorld.py

Class: GameWorld

Properties
Name Value Description
Methods
Name Values Description
__init__ self
AddTargetGroup self,targetGroupID,targetGroupZIndex
AddLaserWeapon self,laserWeapon
CollectTargetSerialBuffersAsList self Sammelt von ALLEN den TargetGroups die Nachrichten die über den bus gesendet werden sollen.
UpdateTargets self Führt bei ALLEN TargetGroups die UpdateTargets Methode.
GetTargetGroupByID self,targetGroupID

TargetGroup.py

Class: TargetGroup

Properties
Name Value Description
Methods
Name Values Description
__init__ self,gameWorld,targetGroupID,targetGroupZIndex
AddTarget self,targetID,targetZIndex
CollectSerialBufferFromTargetsAsList self Sammelt von ALLEN den Targets die Nachrichten die über den bus gesendet werden sollen.
UpdateTargets self Ruft bei ALLEN Targets die Update Methode auf.
GetTargetByID self,GTBI_id

Target.py

Class: TargetHitRecord

Properties
Name Value Description
Methods
Name Values Description
__init__ self,weapon,hitPoint,hitType

Class: Target

Properties
Name Value Description
Methods
__init__ self,targetGroup,gameWorld,targetID,targetZIndex
HitMe self
AddHit self,weapon,hitPoint,hitType
MakeHitSerialBuffer self
CollectSerialBuffer self
Update self
TurnOffTarget self
UpdateAnimation self
TurnOffNeoPixel self