mirror of
https://github.com/Ikatono/TierMaker.git
synced 2025-10-28 20:45:34 -05:00
initial commit
This commit is contained in:
34
card.cs
Normal file
34
card.cs
Normal file
@@ -0,0 +1,34 @@
|
||||
using Godot;
|
||||
using System;
|
||||
|
||||
public partial class card : Area2D
|
||||
{
|
||||
private Vector2 MouseOffset { get; set; }
|
||||
// Called when the node enters the scene tree for the first time.
|
||||
public override void _Ready()
|
||||
{
|
||||
InputPickable = true;
|
||||
//TODO worry about dragging later, websocket control is more important
|
||||
//InputEvent += MouseClick;
|
||||
}
|
||||
|
||||
// Called every frame. 'delta' is the elapsed time since the previous frame.
|
||||
public override void _Process(double delta)
|
||||
{
|
||||
}
|
||||
|
||||
private void MouseClick(Node viewport, InputEvent @event, long shapeIdx)
|
||||
{
|
||||
if (@event is InputEventMouse mouseEvent)
|
||||
{
|
||||
if (mouseEvent.IsActionPressed("click"))
|
||||
{
|
||||
|
||||
}
|
||||
else if (mouseEvent.IsActionReleased("click"))
|
||||
{
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user