Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
initialize variables
jumpspeed_normal = 7;
jumpspeed_powerup = 10;
jumpspeed = jumpspeed_normal
POWERUP
affect other objects from the event of other objects
with (obj_player)
{
jumpspeed = jumpspeed_powerup
sprite_index = spr_player_b;
alarm [0] = 300;
cloneCell = instance_create(x,y,Player1);
STATE MACHNES
enum states
{
clone, normal
}
states.normal= 1
states.ladder = 2
PLAYER
create
state = states.normal
STEP
//will run other states instead
switch (state)
{
case states.normal: scr_player_normal (); break;
case states.ladder: scr_player_ladder (); break;
}
vsp = 0;
state= states.ladder;
}