path + gamin
This commit is contained in:
@@ -1,5 +1,6 @@
|
||||
using Godot;
|
||||
using System;
|
||||
using System.Reflection;
|
||||
|
||||
public partial class Menu : Control
|
||||
{
|
||||
@@ -8,6 +9,7 @@ public partial class Menu : Control
|
||||
[Export] Panel trick;
|
||||
[Export] CharacterBody2D player;
|
||||
Node parent;
|
||||
int spell {get; set;} = 2;
|
||||
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
@@ -22,13 +24,23 @@ public partial class Menu : Control
|
||||
|
||||
public void ResumeDown()
|
||||
{
|
||||
|
||||
Input.MouseMode = Input.MouseModeEnum.Hidden;
|
||||
anim.Play("resume");
|
||||
}
|
||||
|
||||
public void OptionDown()
|
||||
{
|
||||
|
||||
int i = 1;
|
||||
foreach (Label panel in trick.GetNode("GridContainer").GetChildren())
|
||||
{
|
||||
if (i <= spell)
|
||||
{
|
||||
panel.Modulate = new Color(1, 1, 1, 1);
|
||||
GD.Print("trew");
|
||||
}
|
||||
i++;
|
||||
}
|
||||
pause.Visible = false;
|
||||
trick.Visible = true;
|
||||
}
|
||||
@@ -37,8 +49,6 @@ public partial class Menu : Control
|
||||
{
|
||||
GetTree().Paused = false;
|
||||
parent.Call("ToPrincipalFunc");
|
||||
//EmitSignal("ToPrincipalEventHandler");
|
||||
//GetTree().ChangeSceneToPacked(principal);
|
||||
}
|
||||
|
||||
public void Res()
|
||||
|
||||
17
script/PathFollow2d.cs
Normal file
17
script/PathFollow2d.cs
Normal file
@@ -0,0 +1,17 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class PathFollow2d : PathFollow2D
|
||||
{
|
||||
[Export] float speed;
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
ProgressRatio += speed * (float)delta;
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@ public partial class Player : CharacterBody2D
|
||||
|
||||
if(sugar <= 0)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
else if (sugar >= 100)
|
||||
{
|
||||
|
||||
@@ -5,6 +5,7 @@ public partial class Principal : Control
|
||||
{
|
||||
[Export] Panel sub;
|
||||
[Export] Panel credit;
|
||||
|
||||
|
||||
Node parent;
|
||||
|
||||
@@ -22,7 +23,6 @@ public partial class Principal : Control
|
||||
|
||||
public void EnterPressed()
|
||||
{
|
||||
GD.Print("wefwef");
|
||||
sub.Visible = true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user