mirror of
https://github.com/Orama-Interactive/Pixelorama.git
synced 2025-02-24 06:23:13 +00:00
Instead of drawing individual lines, execute draw_isometric_tile() multiple times. What this method does is basically draws a single isometric tile, which then gets repeated for the entire canvas size. Also moved all the grid logic to a new script, which gets updated less often that Canvas.gd, for optimization purposes. Works better than the previous method, although it might be a bit slower, and currently does not work well if the canvas size is not divisible by the grid size. For now, it only gets affected by the grid width. Changing grid height has no effect.
10 lines
290 B
Text
10 lines
290 B
Text
[gd_scene load_steps=3 format=2]
|
|
|
|
[ext_resource path="res://src/Canvas.gd" type="Script" id=1]
|
|
[ext_resource path="res://src/UI/Grid.gd" type="Script" id=2]
|
|
|
|
[node name="Canvas" type="Node2D"]
|
|
script = ExtResource( 1 )
|
|
|
|
[node name="Grid" type="Node2D" parent="."]
|
|
script = ExtResource( 2 )
|