-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnode_3dxxx.cs
39 lines (33 loc) · 1.15 KB
/
node_3dxxx.cs
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
30
31
32
33
34
35
36
37
38
39
using Godot;
using System;
public partial class node_3dxxx : Node3D
{
// Called when the node enters the scene tree for the first time.
public override void _Ready()
{
// Vytvoøení nové instance BoxMesh.
var boxMesh = new BoxMesh();
// Vytvoøení nové instance SpatialMaterial s nastaveným zeleným barvou.
var material = new StandardMaterial3D();
material.AlbedoColor = Colors.Green;
// Vytvoøení nové instance MeshInstance a nastavení BoxMesh a SpatialMaterial.
var meshInstance = new Godot.MeshInstance3D();
meshInstance.Mesh = boxMesh;
meshInstance.MaterialOverlay = material;
// Pøidání MeshInstance do scény.
AddChild(meshInstance);
//AddChild(new Node3DVoxel());
//GetViewport().ClearColor = new Color(1, 1, 1);
/*
Material material = new SpatialMaterial();
material.AlbedoColor = new Color(1, 1, 1);
material.ParamsAmbientLight = 0;
material.ParamsDiffuseLight = 0;
material.ParamsSpecularLight = 0;
*/
}
// Called every frame. 'delta' is the elapsed time since the previous frame.
public override void _Process(double delta)
{
}
}