added bullet class and patterns script
This commit is contained in:
parent
afd14099f5
commit
fbed697b68
|
@ -0,0 +1,37 @@
|
|||
{
|
||||
"spriteId": {
|
||||
"name": "spr_bullet_test",
|
||||
"path": "sprites/spr_bullet_test/spr_bullet_test.yy",
|
||||
},
|
||||
"solid": false,
|
||||
"visible": true,
|
||||
"spriteMaskId": null,
|
||||
"persistent": false,
|
||||
"parentObjectId": {
|
||||
"name": "obj_enemy_bullet_parent",
|
||||
"path": "objects/obj_enemy_bullet_parent/obj_enemy_bullet_parent.yy",
|
||||
},
|
||||
"physicsObject": false,
|
||||
"physicsSensor": false,
|
||||
"physicsShape": 1,
|
||||
"physicsGroup": 1,
|
||||
"physicsDensity": 0.5,
|
||||
"physicsRestitution": 0.1,
|
||||
"physicsLinearDamping": 0.1,
|
||||
"physicsAngularDamping": 0.1,
|
||||
"physicsFriction": 0.2,
|
||||
"physicsStartAwake": true,
|
||||
"physicsKinematic": false,
|
||||
"physicsShapePoints": [],
|
||||
"eventList": [],
|
||||
"properties": [],
|
||||
"overriddenProperties": [],
|
||||
"parent": {
|
||||
"name": "thpj3",
|
||||
"path": "thpj3.yyp",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "obj_bullet_test",
|
||||
"tags": [],
|
||||
"resourceType": "GMObject",
|
||||
}
|
|
@ -0,0 +1,5 @@
|
|||
hp -= other.damage;
|
||||
|
||||
with (other) {
|
||||
instance_destroy();
|
||||
}
|
|
@ -0,0 +1,6 @@
|
|||
if (!other.invuln) {
|
||||
with (other) {
|
||||
emergency = 15;
|
||||
}
|
||||
}
|
||||
instance_destroy();
|
|
@ -0,0 +1 @@
|
|||
temp_speed = 0;
|
|
@ -0,0 +1,20 @@
|
|||
if ( obj_wriggle.bombing || obj_wriggle.respawn ) {
|
||||
if ( obj_wriggle.hyper_time ) {
|
||||
//TODO: create a point item if during a hyper
|
||||
}
|
||||
instance_destroy();
|
||||
}
|
||||
|
||||
if ( obj_wriggle.emergency ) {
|
||||
temp_speed = speed;
|
||||
speed = 0;
|
||||
}
|
||||
if ( !obj_wriggle.emergency && temp_speed ) {
|
||||
speed = temp_speed;
|
||||
temp_speed = 0;
|
||||
}
|
||||
|
||||
|
||||
if ( x < BOUNDARY_LEFT - 128 || x > BOUNDARY_RIGHT + 128 || y < BOUNDARY_TOP - 128 || y > BOUNDARY_BOTTOM + 128 ) {
|
||||
instance_destroy();
|
||||
}
|
|
@ -0,0 +1,35 @@
|
|||
{
|
||||
"spriteId": null,
|
||||
"solid": false,
|
||||
"visible": true,
|
||||
"spriteMaskId": null,
|
||||
"persistent": false,
|
||||
"parentObjectId": null,
|
||||
"physicsObject": false,
|
||||
"physicsSensor": false,
|
||||
"physicsShape": 1,
|
||||
"physicsGroup": 1,
|
||||
"physicsDensity": 0.5,
|
||||
"physicsRestitution": 0.1,
|
||||
"physicsLinearDamping": 0.1,
|
||||
"physicsAngularDamping": 0.1,
|
||||
"physicsFriction": 0.2,
|
||||
"physicsStartAwake": true,
|
||||
"physicsKinematic": false,
|
||||
"physicsShapePoints": [],
|
||||
"eventList": [
|
||||
{"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":4,"collisionObjectId":{"name":"obj_wriggle","path":"objects/obj_wriggle/obj_wriggle.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
],
|
||||
"properties": [],
|
||||
"overriddenProperties": [],
|
||||
"parent": {
|
||||
"name": "thpj3",
|
||||
"path": "thpj3.yyp",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "obj_enemy_bullet_parent",
|
||||
"tags": [],
|
||||
"resourceType": "GMObject",
|
||||
}
|
|
@ -0,0 +1,36 @@
|
|||
{
|
||||
"spriteId": null,
|
||||
"solid": false,
|
||||
"visible": true,
|
||||
"spriteMaskId": null,
|
||||
"persistent": false,
|
||||
"parentObjectId": null,
|
||||
"physicsObject": false,
|
||||
"physicsSensor": false,
|
||||
"physicsShape": 1,
|
||||
"physicsGroup": 1,
|
||||
"physicsDensity": 0.5,
|
||||
"physicsRestitution": 0.1,
|
||||
"physicsLinearDamping": 0.1,
|
||||
"physicsAngularDamping": 0.1,
|
||||
"physicsFriction": 0.2,
|
||||
"physicsStartAwake": true,
|
||||
"physicsKinematic": false,
|
||||
"physicsShapePoints": [],
|
||||
"eventList": [
|
||||
{"isDnD":false,"eventNum":0,"eventType":4,"collisionObjectId":{"name":"obj_player_shot","path":"objects/obj_player_shot/obj_player_shot.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":4,"collisionObjectId":{"name":"obj_wriggle","path":"objects/obj_wriggle/obj_wriggle.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
],
|
||||
"properties": [],
|
||||
"overriddenProperties": [],
|
||||
"parent": {
|
||||
"name": "thpj3",
|
||||
"path": "thpj3.yyp",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "obj_enemy_parent",
|
||||
"tags": [],
|
||||
"resourceType": "GMObject",
|
||||
}
|
|
@ -1 +1,2 @@
|
|||
hp = 10;
|
||||
hp = 10;
|
||||
temp_speed = 0;
|
|
@ -1,3 +1,11 @@
|
|||
if ( hp <= 0 ) {
|
||||
instance_destroy();
|
||||
}
|
||||
if ( obj_wriggle.emergency ) {
|
||||
temp_speed = speed;
|
||||
speed = 0;
|
||||
}
|
||||
if ( !obj_wriggle.emergency && temp_speed ) {
|
||||
speed = temp_speed;
|
||||
temp_speed = 0;
|
||||
}
|
|
@ -0,0 +1,4 @@
|
|||
// Inherit the parent event
|
||||
event_inherited();
|
||||
|
||||
pattern_delay = 10;
|
|
@ -0,0 +1,9 @@
|
|||
// Inherit the parent event
|
||||
event_inherited();
|
||||
|
||||
pattern_delay -= (1 + obj_wriggle.hyper_tier);
|
||||
|
||||
if ( pattern_delay <= 0 ) {
|
||||
scr_pattern_fire( PATTERN_STREAM, 5, obj_bullet_test );
|
||||
pattern_delay = 10;
|
||||
}
|
|
@ -23,7 +23,10 @@
|
|||
"physicsStartAwake": true,
|
||||
"physicsKinematic": false,
|
||||
"physicsShapePoints": [],
|
||||
"eventList": [],
|
||||
"eventList": [
|
||||
{"isDnD":false,"eventNum":0,"eventType":3,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
{"isDnD":false,"eventNum":0,"eventType":0,"collisionObjectId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMEvent",},
|
||||
],
|
||||
"properties": [],
|
||||
"overriddenProperties": [],
|
||||
"parent": {
|
||||
|
|
|
@ -33,6 +33,8 @@ if ( hyper_current > HYPER_MAX ) {
|
|||
}
|
||||
if ( emergency == 0 ) {
|
||||
lives_current -= 1;
|
||||
bombs_current = BOMBS_INIT;
|
||||
hyper_current += HYPER_COST;
|
||||
respawn = RESPAWN_TIMER;
|
||||
x = SPAWN_X;
|
||||
y = SPAWN_Y;
|
||||
|
|
|
@ -53,6 +53,8 @@
|
|||
#macro SHOT_OPTION_DAMAGE 1
|
||||
#macro SHOT_OPTION_SPEED 20
|
||||
|
||||
#macro PATTERN_STREAM 0
|
||||
|
||||
function scr_initialize() {
|
||||
randomize();
|
||||
}
|
|
@ -0,0 +1,19 @@
|
|||
/// @function: scr_pattern_fire( _pattern, _speed, _bullet );
|
||||
/// @param _pattern {real}
|
||||
/// @param _speed {real}
|
||||
/// @param _bullet {object}
|
||||
|
||||
|
||||
function scr_pattern_fire( _pattern, _speed, _bullet ) {
|
||||
switch ( _pattern ) {
|
||||
case PATTERN_STREAM:
|
||||
exy = instance_create_layer( x, y, "Instances", _bullet );
|
||||
with (exy) {
|
||||
speed = _speed + obj_wriggle.hyper_tier;
|
||||
direction = point_direction( x, y, obj_wriggle.x, obj_wriggle.y );
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
}
|
|
@ -0,0 +1,12 @@
|
|||
{
|
||||
"isDnD": false,
|
||||
"isCompatibility": false,
|
||||
"parent": {
|
||||
"name": "thpj3",
|
||||
"path": "thpj3.yyp",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "scr_pattern_fire",
|
||||
"tags": [],
|
||||
"resourceType": "GMScript",
|
||||
}
|
Binary file not shown.
After Width: | Height: | Size: 192 B |
Binary file not shown.
After Width: | Height: | Size: 190 B |
Binary file not shown.
After Width: | Height: | Size: 193 B |
Binary file not shown.
After Width: | Height: | Size: 192 B |
Binary file not shown.
After Width: | Height: | Size: 190 B |
Binary file not shown.
After Width: | Height: | Size: 193 B |
|
@ -0,0 +1,87 @@
|
|||
{
|
||||
"bboxMode": 2,
|
||||
"collisionKind": 2,
|
||||
"type": 0,
|
||||
"origin": 4,
|
||||
"preMultiplyAlpha": false,
|
||||
"edgeFiltering": false,
|
||||
"collisionTolerance": 0,
|
||||
"swfPrecision": 2.525,
|
||||
"bbox_left": 1,
|
||||
"bbox_right": 10,
|
||||
"bbox_top": 1,
|
||||
"bbox_bottom": 10,
|
||||
"HTile": false,
|
||||
"VTile": false,
|
||||
"For3D": false,
|
||||
"width": 12,
|
||||
"height": 12,
|
||||
"textureGroupId": {
|
||||
"name": "Default",
|
||||
"path": "texturegroups/Default",
|
||||
},
|
||||
"swatchColours": null,
|
||||
"gridX": 0,
|
||||
"gridY": 0,
|
||||
"frames": [
|
||||
{"compositeImage":{"FrameId":{"name":"c4bca663-234e-40d7-bea4-ab550fc0a58d","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
|
||||
{"FrameId":{"name":"c4bca663-234e-40d7-bea4-ab550fc0a58d","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"LayerId":{"name":"122e66f5-b202-4588-9dcf-7cb4d06adf29","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
|
||||
],"parent":{"name":"spr_bullet_test","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"resourceVersion":"1.0","name":"c4bca663-234e-40d7-bea4-ab550fc0a58d","tags":[],"resourceType":"GMSpriteFrame",},
|
||||
{"compositeImage":{"FrameId":{"name":"078aef8f-8e85-4de4-8c81-bff953e5b65b","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
|
||||
{"FrameId":{"name":"078aef8f-8e85-4de4-8c81-bff953e5b65b","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"LayerId":{"name":"122e66f5-b202-4588-9dcf-7cb4d06adf29","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
|
||||
],"parent":{"name":"spr_bullet_test","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"resourceVersion":"1.0","name":"078aef8f-8e85-4de4-8c81-bff953e5b65b","tags":[],"resourceType":"GMSpriteFrame",},
|
||||
{"compositeImage":{"FrameId":{"name":"0bd3ae89-2550-41c8-8380-366520a6149c","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"LayerId":null,"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},"images":[
|
||||
{"FrameId":{"name":"0bd3ae89-2550-41c8-8380-366520a6149c","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"LayerId":{"name":"122e66f5-b202-4588-9dcf-7cb4d06adf29","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"resourceVersion":"1.0","name":"","tags":[],"resourceType":"GMSpriteBitmap",},
|
||||
],"parent":{"name":"spr_bullet_test","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"resourceVersion":"1.0","name":"0bd3ae89-2550-41c8-8380-366520a6149c","tags":[],"resourceType":"GMSpriteFrame",},
|
||||
],
|
||||
"sequence": {
|
||||
"spriteId": {"name":"spr_bullet_test","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},
|
||||
"timeUnits": 1,
|
||||
"playback": 1,
|
||||
"playbackSpeed": 10.0,
|
||||
"playbackSpeedType": 0,
|
||||
"autoRecord": true,
|
||||
"volume": 1.0,
|
||||
"length": 3.0,
|
||||
"events": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MessageEventKeyframe>",},
|
||||
"moments": {"Keyframes":[],"resourceVersion":"1.0","resourceType":"KeyframeStore<MomentsEventKeyframe>",},
|
||||
"tracks": [
|
||||
{"name":"frames","spriteId":null,"keyframes":{"Keyframes":[
|
||||
{"id":"eb42b16f-b252-4da5-9a80-1fcb4fa6c566","Key":0.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"c4bca663-234e-40d7-bea4-ab550fc0a58d","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
|
||||
{"id":"509ef5a8-967a-413c-9332-d05c525787b1","Key":1.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"078aef8f-8e85-4de4-8c81-bff953e5b65b","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
|
||||
{"id":"39dd8e0a-8a2e-4e99-929c-70c324c48a06","Key":2.0,"Length":1.0,"Stretch":false,"Disabled":false,"IsCreationKey":false,"Channels":{"0":{"Id":{"name":"0bd3ae89-2550-41c8-8380-366520a6149c","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"resourceVersion":"1.0","resourceType":"SpriteFrameKeyframe",},},"resourceVersion":"1.0","resourceType":"Keyframe<SpriteFrameKeyframe>",},
|
||||
],"resourceVersion":"1.0","resourceType":"KeyframeStore<SpriteFrameKeyframe>",},"trackColour":0,"inheritsTrackColour":true,"builtinName":0,"traits":0,"interpolation":1,"tracks":[],"events":[],"modifiers":[],"isCreationTrack":false,"resourceVersion":"1.0","tags":[],"resourceType":"GMSpriteFramesTrack",},
|
||||
],
|
||||
"visibleRange": null,
|
||||
"lockOrigin": false,
|
||||
"showBackdrop": true,
|
||||
"showBackdropImage": false,
|
||||
"backdropImagePath": "",
|
||||
"backdropImageOpacity": 0.5,
|
||||
"backdropWidth": 1366,
|
||||
"backdropHeight": 768,
|
||||
"backdropXOffset": 0.0,
|
||||
"backdropYOffset": 0.0,
|
||||
"xorigin": 6,
|
||||
"yorigin": 6,
|
||||
"eventToFunction": {},
|
||||
"eventStubScript": null,
|
||||
"parent": {"name":"spr_bullet_test","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},
|
||||
"resourceVersion": "1.3",
|
||||
"name": "spr_bullet_test",
|
||||
"tags": [],
|
||||
"resourceType": "GMSequence",
|
||||
},
|
||||
"layers": [
|
||||
{"visible":true,"isLocked":false,"blendMode":0,"opacity":100.0,"displayName":"default","resourceVersion":"1.0","name":"122e66f5-b202-4588-9dcf-7cb4d06adf29","tags":[],"resourceType":"GMImageLayer",},
|
||||
],
|
||||
"nineSlice": null,
|
||||
"parent": {
|
||||
"name": "thpj3",
|
||||
"path": "thpj3.yyp",
|
||||
},
|
||||
"resourceVersion": "1.0",
|
||||
"name": "spr_bullet_test",
|
||||
"tags": [],
|
||||
"resourceType": "GMSprite",
|
||||
}
|
|
@ -9,6 +9,7 @@
|
|||
{"id":{"name":"obj_title_moon","path":"objects/obj_title_moon/obj_title_moon.yy",},"order":1,},
|
||||
{"id":{"name":"obj_option_shot","path":"objects/obj_option_shot/obj_option_shot.yy",},"order":21,},
|
||||
{"id":{"name":"spr_title_star","path":"sprites/spr_title_star/spr_title_star.yy",},"order":7,},
|
||||
{"id":{"name":"obj_bullet_test","path":"objects/obj_bullet_test/obj_bullet_test.yy",},"order":27,},
|
||||
{"id":{"name":"spr_fluff","path":"sprites/spr_fluff/spr_fluff.yy",},"order":25,},
|
||||
{"id":{"name":"scr_dialogue_start","path":"scripts/scr_dialogue_start/scr_dialogue_start.yy",},"order":10,},
|
||||
{"id":{"name":"rm_disclaimer","path":"rooms/rm_disclaimer/rm_disclaimer.yy",},"order":3,},
|
||||
|
@ -17,9 +18,11 @@
|
|||
{"id":{"name":"obj_wriggle","path":"objects/obj_wriggle/obj_wriggle.yy",},"order":11,},
|
||||
{"id":{"name":"spr_title_bg","path":"sprites/spr_title_bg/spr_title_bg.yy",},"order":5,},
|
||||
{"id":{"name":"spr_wriggle","path":"sprites/spr_wriggle/spr_wriggle.yy",},"order":14,},
|
||||
{"id":{"name":"obj_enemy_bullet_parent","path":"objects/obj_enemy_bullet_parent/obj_enemy_bullet_parent.yy",},"order":26,},
|
||||
{"id":{"name":"obj_enemy_test","path":"objects/obj_enemy_test/obj_enemy_test.yy",},"order":24,},
|
||||
{"id":{"name":"obj_player_shot","path":"objects/obj_player_shot/obj_player_shot.yy",},"order":17,},
|
||||
{"id":{"name":"spr_option_shot","path":"sprites/spr_option_shot/spr_option_shot.yy",},"order":19,},
|
||||
{"id":{"name":"spr_bullet_test","path":"sprites/spr_bullet_test/spr_bullet_test.yy",},"order":28,},
|
||||
{"id":{"name":"Room3","path":"rooms/Room3/Room3.yy",},"order":6,},
|
||||
{"id":{"name":"spr_title_title","path":"sprites/spr_title_title/spr_title_title.yy",},"order":8,},
|
||||
{"id":{"name":"scr_initialize","path":"scripts/scr_initialize/scr_initialize.yy",},"order":12,},
|
||||
|
@ -31,6 +34,7 @@
|
|||
{"id":{"name":"fn_GUI","path":"fonts/fn_GUI/fn_GUI.yy",},"order":22,},
|
||||
{"id":{"name":"obj_title_star","path":"objects/obj_title_star/obj_title_star.yy",},"order":2,},
|
||||
{"id":{"name":"spr_text_box","path":"sprites/spr_text_box/spr_text_box.yy",},"order":2,},
|
||||
{"id":{"name":"scr_pattern_fire","path":"scripts/scr_pattern_fire/scr_pattern_fire.yy",},"order":29,},
|
||||
{"id":{"name":"obj_title_title","path":"objects/obj_title_title/obj_title_title.yy",},"order":4,},
|
||||
{"id":{"name":"obj_title_screen","path":"objects/obj_title_screen/obj_title_screen.yy",},"order":5,},
|
||||
{"id":{"name":"obj_dialogue","path":"objects/obj_dialogue/obj_dialogue.yy",},"order":0,},
|
||||
|
|
Loading…
Reference in New Issue