diff --git a/Sprites/Container/Crate.png b/Sprites/Container/Crate.png new file mode 100755 index 0000000..8161906 Binary files /dev/null and b/Sprites/Container/Crate.png differ diff --git a/Sprites/Container/Crate.xcf b/Sprites/Container/Crate.xcf new file mode 100755 index 0000000..a7e286f Binary files /dev/null and b/Sprites/Container/Crate.xcf differ diff --git a/Sprites/Container/Drinkomat.png b/Sprites/Container/Drinkomat.png new file mode 100755 index 0000000..30e59cd Binary files /dev/null and b/Sprites/Container/Drinkomat.png differ diff --git a/Sprites/Container/Drinkomat.xcf b/Sprites/Container/Drinkomat.xcf new file mode 100755 index 0000000..1911cd2 Binary files /dev/null and b/Sprites/Container/Drinkomat.xcf differ diff --git a/Sprites/Container/muelleimer.png b/Sprites/Container/muelleimer.png new file mode 100755 index 0000000..bb2640e Binary files /dev/null and b/Sprites/Container/muelleimer.png differ diff --git a/Sprites/Container/muelleimer.xcf b/Sprites/Container/muelleimer.xcf new file mode 100755 index 0000000..9abc7a2 Binary files /dev/null and b/Sprites/Container/muelleimer.xcf differ diff --git a/enemy/enemy.tscn b/enemy/enemy.tscn index 7189e25..4060cb0 100644 --- a/enemy/enemy.tscn +++ b/enemy/enemy.tscn @@ -9,7 +9,7 @@ extents = Vector2( 9.9237, 9.89589 ) [sub_resource type="GDScript" id=2] -script/source = "#extends RigidBody2D\nvar WALK_ACCEL = 800.0\nvar WALK_DEACCEL = 800.0\nvar WALK_MAX_VELOCITY = 200.0\nvar damage = 10\nvar health = 100\n\nvar enemy_size\n\nvar direction = Vector2(1.0, 0.0) #right\n\nfunc _ready():\n\t# Called every time the node is added to the scene.\n\t# Initialization here\n\tenemy_size = get_node(\"enemy\").get_texture().get_size()\n\t\n\t\n\tset_fixed_process(true)\n\nfunc _integrate_forces(s):\n\t\n\t#print(s.get_contact_count())\n\t\n\tvar lv = s.get_linear_velocity()\n\tvar step = s.get_step()\n\t\n\tvar move_left = false\n\tvar move_right = false\n\tvar move_up = false\n\tvar move_down = false\n\t\n\t#var shoot = Input.is_action_pressed(\"shoot\")\n\n\tvar enemy_rect = Rect2( get_node(\"enemy\").get_pos() - enemy_size*0.5, enemy_size )\n\tvar enemy_pos = get_node(\"enemy\").get_pos()\n\t\n\t\n\tif (move_left and not move_right): #left\n\t\tif (lv.x > -WALK_MAX_VELOCITY):\n\t\t\tlv.x -= WALK_ACCEL*step\n\t\tdirection = Vector2(-1.0, 0.0)\n\telif (move_right and not move_left): #right\n\t\tif (lv.x < WALK_MAX_VELOCITY):\n\t\t\tlv.x += WALK_ACCEL*step\n\t\tdirection = Vector2(1.0, 0.0)\n\telif (move_down and not move_up): #down\n\t\tif (lv.y < WALK_MAX_VELOCITY):\n\t\t\tlv.y += WALK_ACCEL*step\n\t\tdirection = Vector2(0.0, 1.0)\n\telif (move_up and not move_down): #ip\n\t\tif (lv.y > -WALK_MAX_VELOCITY):\n\t\t\tlv.y -= WALK_ACCEL*step\n\t\tdirection = Vector2(0.0, -1.0)\n\telse:\n\t\t\tvar xv = abs(lv.x)\n\t\t\tvar yv = abs(lv.y)\n\t\t\t\n\t\t\txv -= WALK_DEACCEL*step\n\t\t\tif (xv < 0):\n\t\t\t\txv = 0\n\t\t\tlv.x = sign(lv.x)*xv\n\t\t\t\n\t\t\tyv -= WALK_DEACCEL*step\n\t\t\tif (yv < 0):\n\t\t\t\tyv = 0\n\t\t\tlv.y = sign(lv.y)*yv\n\t\t\t\n\ts.set_linear_velocity(lv)\n\n\nfunc _on_enemy_body_enter( body ):\n\t#body.\n\tprint(\"enemy coll\")\n\tpass # replace with function body\n\nfunc getDamage():\n\treturn damage" +script/source = "#extends RigidBody2D\nvar WALK_ACCEL = 800.0\nvar WALK_DEACCEL = 800.0\nvar WALK_MAX_VELOCITY = 200.0\nvar damage = 10\nvar health = 100\n\nvar move_direction = Vector2(1,0)\n\nvar enemy_size\n\nvar direction = Vector2(1.0, 0.0) #right\n\nfunc _ready():\n\t# Called every time the node is added to the scene.\n\t# Initialization here\n\tenemy_size = get_node(\"enemy\").get_texture().get_size()\n\t\n\t\n\tset_fixed_process(true)\n\n\nfunc _integrate_forces(s):\n\t\n\tprint(randf())\n\t#print(s.get_contact_count())\n\t\n\tvar lv = s.get_linear_velocity()\n\tvar step = s.get_step()\n\t\n\tvar move_left = false\n\tvar move_right = false\n\tvar move_up = false\n\tvar move_down = false\n\t\n\t#var shoot = Input.is_action_pressed(\"shoot\")\n\n\tvar enemy_rect = Rect2( get_node(\"enemy\").get_pos() - enemy_size*0.5, enemy_size )\n\tvar enemy_pos = get_node(\"enemy\").get_pos()\n\t\n\t\n\tif (move_left and not move_right): #left\n\t\tif (lv.x > -WALK_MAX_VELOCITY):\n\t\t\tlv.x -= WALK_ACCEL*step\n\t\tdirection = Vector2(-1.0, 0.0)\n\telif (move_right and not move_left): #right\n\t\tif (lv.x < WALK_MAX_VELOCITY):\n\t\t\tlv.x += WALK_ACCEL*step\n\t\tdirection = Vector2(1.0, 0.0)\n\telif (move_down and not move_up): #down\n\t\tif (lv.y < WALK_MAX_VELOCITY):\n\t\t\tlv.y += WALK_ACCEL*step\n\t\tdirection = Vector2(0.0, 1.0)\n\telif (move_up and not move_down): #ip\n\t\tif (lv.y > -WALK_MAX_VELOCITY):\n\t\t\tlv.y -= WALK_ACCEL*step\n\t\tdirection = Vector2(0.0, -1.0)\n\telse:\n\t\t\tvar xv = abs(lv.x)\n\t\t\tvar yv = abs(lv.y)\n\t\t\t\n\t\t\txv -= WALK_DEACCEL*step\n\t\t\tif (xv < 0):\n\t\t\t\txv = 0\n\t\t\tlv.x = sign(lv.x)*xv\n\t\t\t\n\t\t\tyv -= WALK_DEACCEL*step\n\t\t\tif (yv < 0):\n\t\t\t\tyv = 0\n\t\t\tlv.y = sign(lv.y)*yv\n\t\t\t\n\ts.set_linear_velocity(lv)\n\n\nfunc _on_enemy_body_enter( body ):\n\t#body.\n\tprint(\"enemy coll\")\n\tpass # replace with function body\n\nfunc getDamage():\n\treturn damage" [node name="enemy" type="RigidBody2D" groups=[ "enemy" ]] @@ -21,7 +21,7 @@ shapes/0/transform = Matrix32( 2.83209, 0, 0, 2.49955, -3.11282, 0.396297 ) shapes/0/trigger = false collision/layers = 1 collision/mask = 1 -mode = 3 +mode = 0 mass = 1.0 friction = 1.0 bounce = 0.0 diff --git a/inventory/item.tscn b/inventory/item.tscn index e624ed0..8dcf4ba 100644 --- a/inventory/item.tscn +++ b/inventory/item.tscn @@ -2,7 +2,7 @@ [sub_resource type="GDScript" id=1] -script/source = "export(int) var speedup = 0\nexport(int) var damage = 0\nexport(int) var weaponrange = 0\nexport(String) var name = \"leer\"\nexport(int) var type\n\nexport(bool) var equipped\n\nfunc getSpeedup():\n\tif(equipped):\n\t\t\n\t\treturn speedup\n\telse:\n\t\treturn 0\n\nfunc getDamage():\n\tif(equipped):\n\t\t\n\t\treturn damage\n\telse:\n\t\treturn 0\n\nfunc getRange():\n\tif(equipped):\n\t\t\n\t\treturn weaponrange\n\telse:\n\t\treturn 0\n\nfunc setStats(s,d,w):\n\tspeedup = s\n\tdamage = d\n\tweaponrange = w\n\nfunc isEquipped():\n\treturn equipped\n\nfunc _ready():\n\tsetTooltip()\n\tpass\n\nfunc setName(n):\n\tname = n\n\t#set_tooltip(name)\n\nfunc setTooltip():\n\tvar tt = name + \"\\n\"\n\ttt+= \"Geschindigkeit: +\" + str(speedup) + \"\\n\"\n\ttt+= \"Damage: +\" + str(damage) + \"\\n\"\n\ttt+= \"Reichweite: +\" + str(weaponrange)\n\tset_tooltip(tt)\n\nfunc equip():\n\tif(equipped):\n\t\tprint(\"\")\n\t\tequipped = false\n\t\tset_tooltip(name)\n\t\tprint(name)\n\t\t#self.set_pos(pos)#\n\t\tset_opacity(1)\n\telse:\n\t\tequipped = true\n\t\tset_opacity(0.2)\n\t\t#print (\"equip()\")\n\t" +script/source = "export(int) var speedup = 0\nexport(int) var damage = 0\nexport(int) var weaponrange = 0\n\nexport(String) var name = \"leer\"\nexport(int) var type\n\nexport(bool) var equipped\n\nfunc getSpeedup():\n\tif(equipped):\n\t\t\n\t\treturn speedup\n\telse:\n\t\treturn 0\n\nfunc getDamage():\n\tif(equipped):\n\t\t\n\t\treturn damage\n\telse:\n\t\treturn 0\n\nfunc getRange():\n\tif(equipped):\n\t\t\n\t\treturn weaponrange\n\telse:\n\t\treturn 0\n\nfunc setStats(s,d,w):\n\tspeedup = s\n\tdamage = d\n\tweaponrange = w\n\nfunc isEquipped():\n\treturn equipped\n\nfunc _ready():\n\tsetTooltip()\n\tpass\n\nfunc setName(n):\n\tname = n\n\t#set_tooltip(name)\n\nfunc setTooltip():\n\tvar tt = name + \"\\n\"\n\ttt+= \"Geschindigkeit: +\" + str(speedup) + \"\\n\"\n\ttt+= \"Damage: +\" + str(damage) + \"\\n\"\n\ttt+= \"Reichweite: +\" + str(weaponrange)\n\tif(equipped):\n\t\ttt+= \"\\n(equipped)\"\n\tset_tooltip(tt)\n\nfunc equip():\n\tif(equipped):\n\n\t\tsetTooltip()\n\t\tset_opacity(1)\n\telse:\n\t\tequipped = true\n\t\tset_opacity(0.2)\n\t\tsetTooltip()\n\t\t#print (\"equip()\")\n\t" [node name="item" type="TextureButton"] diff --git a/menu/menu.tscn b/menu/menu.tscn index d2873fc..b4201e7 100644 --- a/menu/menu.tscn +++ b/menu/menu.tscn @@ -30,6 +30,8 @@ textures/normal = ExtResource( 1 ) [node name="options" type="TextureButton" parent="."] +visibility/opacity = 0.5 +hint/tooltip = "SOON!!!\n" focus/ignore_mouse = false focus/stop_mouse = true size_flags/horizontal = 2 @@ -38,6 +40,7 @@ margin/left = 606.0 margin/top = 73.0 margin/right = 856.0 margin/bottom = 173.0 +disabled = true toggle_mode = false enabled_focus_mode = 2 shortcut = null