3D Workspace
Home
Assets
Affiliate Program
Creator Program
Sign up/Log in
?
Upgrade
DCC Bridge
Anonymous1782831352
06-30 15:02
Model Name
game control panel 3d model
Tags
props
game asset
realistic
Prompt
extends Control @onready var start_button = $StartButton @onready var quit_button = $QuitButton func _ready(): start_button.pressed.connect(_on_start_pressed) quit_button.pressed.connect(_on_quit_pressed) func _on_start_pressed(): get_tree().change_scene_to_file("res://Scenes/Game.tscn") func _on_quit_pressed(): get_tree().quit() onst SPEED = 200.0 const JUMP_VELOCITY = -400.0 const GRAVITY = 980.0 var health: int = 100 var ammo: int = 30 var score: int = 0 @onready var bullet_scene = preload("res://Scenes/Bullet.tscn") @onready var sprite = $Sprite2D @onready var gun_point = $GunPoint func _physics_process(delta): # الجاذبية if not is_on_floor(): velocity.y += GRAVITY * delta # الحركة var direction = Input.get_axis("ui_left", "ui_right") if direction: velocity.x = direction * SPEED sprite.flip_h = direction < 0 else: velocity.x = move_toward(velocity.x, 0, SPEED) # القفز if Input.is_action_just_pressed("ui_up") and is_on_floor(): velocity.y = JUMP_VELOCI
Detailed Info
Related Models
Enter invite code
Enter invite code to get credits!