| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465 |
- get_hit = function(_info)
- {
- if has_ink
- player_add_INK(1);
- else
- {
- var _struct = particle_get_info(peBladeHitHazard);
- var _part_type = _struct.emitters[0].parttype.ind;
- var _dir = point_direction(0, 0, -_info.kbFactorX, -_info.kbFactorY);
- part_type_direction(_part_type, _dir - 45, _dir + 45, 0, 5);
-
- var _part = part_system_create_layer("Effect", false, peBladeHitHazard);
- part_system_position(_part, x, y);
- }
-
- flash_timer = 6;
- flash_duration = 6;
-
- hp -= _info.damage;
-
- hitstun_timer = hitstun_max;
- x_spd_kb = _info.kbFactorX * kb_factor;
- y_spd_kb = _info.kbFactorY * kb_factor;
- if hp <= 0
- {
- is_dead = true;
- enemy_death();
- }
- };
- x_spd = 0;
- y_spd = 0;
- facing_x = 1;
- facing_y = 1;
- credit = 0;
- has_ink = true;
- hp = 1;
- hitstun_timer = 0;
- hitstun_max = 10;
- kb_factor = 1.0;
- collision_hitbox = noone;
- is_dead = false;
- state = undefined;
- enemy_ai = function(){};
- death_callback = function(){};
- animation_spd = 0.25;
- image_speed = 0;
- hitbox = noone;
- // shader
- flash_timer = 0;
- flash_duration = 0;
- u_flash_alpha = shader_get_uniform(sh_flash, "f_alpha");
|