diff options
| author | realtradam <[email protected]> | 2020-03-19 03:42:03 -0400 |
|---|---|---|
| committer | realtradam <[email protected]> | 2020-03-19 03:42:03 -0400 |
| commit | af6441b9b8b93e0b6abb16ec924e90a16e017a96 (patch) | |
| tree | ae50d2bc55909996c0fbe0b5411bcdee0cb1f103 /Racing-Game/4WheelCar/Weight/WeightCreation.gd | |
| parent | c7e8f17ba13d4c9e54764286367a26f25b049dc4 (diff) | |
| download | optimal-direction-af6441b9b8b93e0b6abb16ec924e90a16e017a96.tar.gz optimal-direction-af6441b9b8b93e0b6abb16ec924e90a16e017a96.zip | |
renamed variables to be more readable
Diffstat (limited to 'Racing-Game/4WheelCar/Weight/WeightCreation.gd')
| -rw-r--r-- | Racing-Game/4WheelCar/Weight/WeightCreation.gd | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Racing-Game/4WheelCar/Weight/WeightCreation.gd b/Racing-Game/4WheelCar/Weight/WeightCreation.gd index 290325c..a6d9786 100644 --- a/Racing-Game/4WheelCar/Weight/WeightCreation.gd +++ b/Racing-Game/4WheelCar/Weight/WeightCreation.gd @@ -7,7 +7,7 @@ extends Node # Called when the node enters the scene tree for the first time. func _ready(): - createWeight([0,30,30]) + createWeight(0,30,30) pass # Replace with function body. @@ -15,9 +15,9 @@ func _ready(): #func _process(delta): # pass -func createWeight(dataArray): +func createWeight(locX,locY,Mass): var weighttemp_resource = load("res://4WheelCar/Weight/Weight.tscn") var weighttemp = weighttemp_resource.instance() - weighttemp.set_position(Vector2(dataArray[0],dataArray[1])) + weighttemp.set_position(Vector2(locX,locY)) add_child(weighttemp) - weighttemp.initVars(dataArray) + weighttemp.initVars(locX,locY,Mass) |
