summaryrefslogtreecommitdiffhomepage
path: root/Racing-Game/Interface/Camera2D.gd
blob: 2b0da27b0a0d85570c7099e601065083b7b76529 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
extends Camera2D

# Declare member variables here. Examples:
# var a = 2
# var b = "text"
var printfps = 0;

# Called when the node enters the scene tree for the first time.
func _ready():
	zoom = Vector2(2,2)
	pass # Replace with function body.

# Called every frame. 'delta' is the elapsed time since the previous frame.
func _process(_delta):
#	#print fps
#	printfps += delta
#	if(printfps > 1):
#		print(1/delta)
#		printfps -= 1
	pass
	
func set_position(pos):
	position = pos;


func _on_CarBody_pos(pos):
	#velocity = velocity/100 + 1.5
	#zoom = Vector2(velocity,velocity)
	position = pos