Inizio con una cosa davvero semplice ma di effetto a parer mio, lo scoreboard:
Aggiungere nel file match.bmx
Code: Select all
'SCOREBOARD
Function draw_scoreboard()
''teams
text10u(team[HOME].name, screen_w -35, 1, img_ucode10g, -1)
text10u(team[AWAY].name, screen_w -35, 25, img_ucode10g, -1)
''home score
Local f0:Int = stats[HOME].goal Mod 10
Local f1:Int = ((stats[HOME].goal - f0) / 10) Mod 10
If (f1 > 0)
text10u(f1, screen_w -20, 1, img_ucode10g, -1)
EndIf
text10u(f0, screen_w -8, 1, img_ucode10g, -1)
''away score
f0 = stats[AWAY].goal Mod 10
f1 = (stats[AWAY].goal - f0) / 10 Mod 10
If (f1 > 0)
text10u(f1, screen_w -20, 25, img_ucode10g, -1)
text10u(f0, screen_w -8, 25, img_ucode10g, -1)
Else
text10u(f0, screen_w -8, 25, img_ucode10g, -1)
EndIf
End Function
Code: Select all
Field display_scoreboard:Int
Method New()
Self.frame0 = frame
Self.display_controlled_player = True
Self.display_ball_owner = False
Self.display_goal_scorer = False
Self.display_time = True
Self.display_wind_vane = True
Self.display_score = False
Self.display_scoreboard = True
Self.display_statistics = False
End Method
''scoreboard
If (Self.display_scoreboard)
draw_scoreboard()
EndIf