Class: PFM::MiningGame

Inherits:
Object show all
Defined in:
scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb,
scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00002 MiningGame_GridHandler.rb
more...

Overview

Class describing the Hall_of_Fame logic

Defined Under Namespace

Classes: Diggable, GridHandler

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeMiningGame

Returns a new instance of MiningGame.

[View source]

34
35
36
37
38
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 34

def initialize
  @first_time = true
  @dynamite_unlocked = @hard_mode = false
  @nb_items_dug = @nb_game_launched = @nb_game_success = @nb_game_failed = @nb_pickaxe_hit = @nb_mace_hit = @nb_dynamite_hit = 0
end

Instance Attribute Details

#dynamite_unlockedBoolean

If the player has access to the new dynamite tool

Returns:

  • (Boolean)

9
10
11
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 9

def dynamite_unlocked
  @dynamite_unlocked
end

#first_timeBoolean

If the player is playing the mini-game for the first time

Returns:

  • (Boolean)

6
7
8
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 6

def first_time
  @first_time
end

#hard_modeBoolean

Set the difficulty of the game (true = no yellow tiles at beginning)

Returns:

  • (Boolean)

33
34
35
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 33

def hard_mode
  @hard_mode
end

#nb_dynamite_hitInteger

Tells how many times the player used the dynamite

Returns:


30
31
32
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 30

def nb_dynamite_hit
  @nb_dynamite_hit
end

#nb_game_failedInteger

Tells how many times the player failed in the mini-game (wall collapsing)

Returns:


21
22
23
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 21

def nb_game_failed
  @nb_game_failed
end

#nb_game_launchedInteger

Tells how many times the player has launched the mini-game

Returns:


15
16
17
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 15

def nb_game_launched
  @nb_game_launched
end

#nb_game_successInteger

Tells how many times the player succeeded in the mini-game (every items dug)

Returns:


18
19
20
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 18

def nb_game_success
  @nb_game_success
end

#nb_items_dugInteger

Tells how many items the player has dug

Returns:


12
13
14
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 12

def nb_items_dug
  @nb_items_dug
end

#nb_mace_hitInteger

Tells how many times the player used the mace

Returns:


27
28
29
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 27

def nb_mace_hit
  @nb_mace_hit
end

#nb_pickaxe_hitInteger

Tells how many times the player used the pickaxe

Returns:


24
25
26
# File 'scripts/01450 Systems/08001 Mining Game/00020 PFM_Mining_Game/00001 MiningGame.rb', line 24

def nb_pickaxe_hit
  @nb_pickaxe_hit
end