added fullscreen
This commit is contained in:
@@ -60,6 +60,12 @@ move_down={
|
|||||||
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777234,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
fullscreen={
|
||||||
|
"deadzone": 0.5,
|
||||||
|
"events": [ Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":false,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777254,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
, Object(InputEventKey,"resource_local_to_scene":false,"resource_name":"","device":0,"alt":true,"shift":false,"control":false,"meta":false,"command":false,"pressed":false,"scancode":16777221,"physical_scancode":0,"unicode":0,"echo":false,"script":null)
|
||||||
|
]
|
||||||
|
}
|
||||||
|
|
||||||
[mono]
|
[mono]
|
||||||
|
|
||||||
|
@@ -1,9 +1,11 @@
|
|||||||
[gd_scene load_steps=3 format=2]
|
[gd_scene load_steps=4 format=2]
|
||||||
|
|
||||||
[ext_resource path="res://scenes/Player.tscn" type="PackedScene" id=1]
|
[ext_resource path="res://scenes/Player.tscn" type="PackedScene" id=1]
|
||||||
[ext_resource path="res://scenes/World.tscn" type="PackedScene" id=2]
|
[ext_resource path="res://scenes/World.tscn" type="PackedScene" id=2]
|
||||||
|
[ext_resource path="res://src/Main.cs" type="Script" id=3]
|
||||||
|
|
||||||
[node name="Main" type="Node2D"]
|
[node name="Main" type="Node2D"]
|
||||||
|
script = ExtResource( 3 )
|
||||||
|
|
||||||
[node name="World" parent="." instance=ExtResource( 2 )]
|
[node name="World" parent="." instance=ExtResource( 2 )]
|
||||||
|
|
||||||
|
@@ -12,7 +12,7 @@ animations = [ {
|
|||||||
} ]
|
} ]
|
||||||
|
|
||||||
[sub_resource type="CapsuleShape2D" id=2]
|
[sub_resource type="CapsuleShape2D" id=2]
|
||||||
radius = 11.0
|
radius = 46.0
|
||||||
height = 4.0
|
height = 4.0
|
||||||
|
|
||||||
[node name="Player" type="Area2D"]
|
[node name="Player" type="Area2D"]
|
||||||
@@ -22,7 +22,7 @@ __meta__ = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
[node name="AnimatedSprite" type="AnimatedSprite" parent="."]
|
||||||
scale = Vector2( 0.2, 0.2 )
|
scale = Vector2( 0.7, 0.7 )
|
||||||
frames = SubResource( 1 )
|
frames = SubResource( 1 )
|
||||||
|
|
||||||
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
|
||||||
|
23
src/Main.cs
Normal file
23
src/Main.cs
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
using Godot;
|
||||||
|
using System;
|
||||||
|
|
||||||
|
public class Main : Node2D
|
||||||
|
{
|
||||||
|
// Declare member variables here. Examples:
|
||||||
|
// private int a = 2;
|
||||||
|
// private string b = "text";
|
||||||
|
|
||||||
|
// Called when the node enters the scene tree for the first time.
|
||||||
|
public override void _Ready()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public override async void _Process(float delta)
|
||||||
|
{
|
||||||
|
if (Input.IsActionJustReleased("fullscreen"))
|
||||||
|
{
|
||||||
|
OS.WindowFullscreen = !OS.WindowFullscreen;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user