Browse Source

Add coins

Added coins so that users have a reason to move around more
master
Abheek Dhawan 4 years ago
parent
commit
20456be75b
  1. 1
      .gitignore
  2. 2
      Game Scenes/Game.tscn
  3. BIN
      Images and Anims/.DS_Store
  4. 20
      Scripts/AsteroidSpawn.gd
  5. 6
      export_presets.cfg
  6. 1
      project.godot

1
.gitignore

@ -354,6 +354,7 @@ Builds/
# Don't include completely irrelevant .DS_Store files
.DS_Store
Images\ and\ Anims/.DS_Store
# Don't include deleted files import folder
.import/

2
Game Scenes/Game.tscn

@ -3,7 +3,7 @@
[ext_resource path="res://Objects/Rocket.tscn" type="PackedScene" id=1]
[ext_resource path="res://Scripts/Rocket.gd" type="Script" id=2]
[ext_resource path="res://Images and Anims/In Game/background.png" type="Texture" id=3]
[ext_resource path="res://Scripts/AsteroidSpawn.gd" type="Script" id=4]
[ext_resource path="res://Scripts/Game.gd" type="Script" id=4]
[ext_resource path="res://Scripts/Score.gd" type="Script" id=5]
[node name="Game" type="Node2D"]

BIN
Images and Anims/.DS_Store

Binary file not shown.

20
Scripts/AsteroidSpawn.gd

@ -1,20 +0,0 @@
extends Node2D
var time = 0
var asteroidObj = load("res://Objects/Asteroid.tscn")
var spawnTime
var deltaSpawnTime = 1
func _process(delta):
spawnTime = 500/get_viewport_rect().size.x * deltaSpawnTime
time += delta
if time > spawnTime:
time = 0
if spawnTime > 300/get_viewport_rect().size.x:
deltaSpawnTime *= 0.995
if has_node("Rocket"):
var asteroid = asteroidObj.instance()
add_child(asteroid)
asteroid.position.x = rand_range($Rocket.position.x - get_viewport_rect().size.x/2, $Rocket.position.x + get_viewport_rect().size.x/2)
asteroid.position.y = rand_range($Rocket.position.y - get_viewport_rect().size.y, $Rocket.position.y - 2 * get_viewport_rect().size.y)
asteroid.rotation = rand_range(0, 6.28)

6
export_presets.cfg

@ -137,7 +137,7 @@ custom_features=""
export_filter="all_resources"
include_filter=""
exclude_filter=""
export_path="iOS/spacescape2d.ipa"
export_path="Builds/spacescape2d.ipa"
patch_list=PoolStringArray( )
script_export_mode=1
script_encryption_key=""
@ -146,7 +146,7 @@ script_encryption_key=""
custom_template/debug=""
custom_template/release=""
application/app_store_team_id="00112233445566"
application/app_store_team_id="W7MPRYQYBM"
application/provisioning_profile_uuid_debug=""
application/code_sign_identity_debug="iPhone Developer"
application/export_method_debug=1
@ -159,7 +159,7 @@ application/identifier="com.ADAwesomeGames.SpacEscape2D"
application/signature=""
application/short_version="1.0"
application/version="1.0"
application/copyright=""
application/copyright="2020 AD Awesome Games"
capabilities/arkit=false
capabilities/camera=false
capabilities/access_wifi=false

1
project.godot

@ -18,7 +18,6 @@ _global_script_class_icons={
config/name="SpacEscape"
config/description="Simple game based on avoiding asteroids while controlling a rocket."
run/main_scene="res://Game Scenes/Game.tscn"
boot_splash/image="res://Images and Anims/Other/icon.png"
config/icon="res://Images and Anims/Other/icon.png"
[input]

Loading…
Cancel
Save