blob: 87a8d4784f16241d1fd3407826a4ab79e06f262a (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
extends Node
const font_b612: String = "res://licenses/font_b612.txt"
const godot: String = "res://licenses/godot.txt"
# @DAM For now, it just keeping track of licenses and storing a sample code of how to read the files.
func _ready():
# load_file(file)
pass
func load_file(file: String):
var f = File.new()
f.open(file, File.READ)
var index = 1
while not f.eof_reached(): # iterate through all lines until the end of file is reached
var line = f.get_line()
line += " "
print(line + str(index))
index += 1
f.close()
return
|