Compare commits

...

9 Commits

158 changed files with 932 additions and 2443 deletions

View File

@@ -1,181 +0,0 @@
using Godot;
using System;
using System.Runtime;
/// TODO create a few types of balls
public partial class Ball : RigidBody2D
{
[Signal]
public delegate void OnHoverEventHandler(Ball THIS, bool HOVERED);
[Signal]
public delegate void OnCollisionEventHandler(Ball THIS, Ball TARGET);
[Signal]
public delegate void OnLaunchEventHandler(Ball THIS);
[Signal]
public delegate void OnMovementEventHandler(Ball THIS, bool MOVING);
public bool _active = false, _placed = false, _potted = false, _available = false, _hovered = false, _selected = false, _aimed = false, _launched = false, _moving = false, _isCue = false;
public float _moveThreshold = 5.0f;
public string _id, _imagePath = null;
public Vector2I _rackPosition = new Vector2I(0, 0);
public Manager _owner = null;
public override void _Process(double DELTA_)
{
if (LinearVelocity.Length() > 0 && LinearVelocity.Length() < _moveThreshold)
{
Sleeping = true;
if (_moving)
{
ProcessOnStop();
_moving = false;
EmitSignal(SignalName.OnMovement, this, false);
if (_launched)
{
_launched = false;
}
}
}
else if (LinearVelocity.Length() >= _moveThreshold && !Sleeping)
{
ProcessOnMovement();
if (!_moving)
{
_moving = true;
EmitSignal(SignalName.OnMovement, this, true);
}
}
}
public void Launch()
{
ProcessOnLaunch();
}
public void Pot()
{
Sleeping = true;
_active = false;
_placed = false;
_potted = true;
_moving = false;
}
public void SetSprite(string PATH)
{
_imagePath = PATH;
GetNode<Sprite2D>("Image").Texture = GD.Load<Texture2D>(PATH);
}
private void OnBodyEntered(Node2D TARGET)
{
if (TARGET is Ball)
{
Ball target = (Ball)TARGET;
ProcessOnCollision(target);
}
}
private void OnMouseEntered()
{
if (_active)
{
_hovered = true;
EmitSignal(SignalName.OnHover, this, true);
}
}
private void OnMouseExited()
{
if (_active)
{
_hovered = false;
EmitSignal(SignalName.OnHover, this, false);
}
}
//Processes
// public virtual void ProcessOnAdd()
// {
// }
// public virtual void ProcessOnBattleStart()
// {
// }
// public virtual void ProcessOnBattleEnd()
// {
// }
public virtual void ProcessOnCollision(Ball TARGET)
{
EmitSignal(SignalName.OnCollision, this, TARGET);
}
// public virtual void ProcessOnCreation()
// {
// }
// public virtual void ProcessOnCritical()
// {
// }
// public virtual void ProcessOnDeath()
// {
// }
// public virtual void ProcessOnDefend()
// {
// }
// public virtual void ProcessOnExpiration()
// {
// }
public virtual void ProcessOnLaunch()
{
_launched = true;
EmitSignal(SignalName.OnLaunch, this);
}
public virtual void ProcessOnMovement()
{
}
// public virtual void ProcessOnRemove()
// {
// }
// public virtual void ProcessOnSell()
// {
// }
public virtual void ProcessOnStop()
{
}
// public virtual void ProcessOnTurnEnd()
// {
// }
// public virtual void ProcessOnTurnStart()
// {
// }
}

View File

@@ -1 +0,0 @@
uid://dgdxx8tceiljg

View File

@@ -1,7 +0,0 @@
using Godot;
using System;
public partial class BallReturn : Panel
{
public int _returnCount = 0;
}

View File

@@ -1 +0,0 @@
uid://bbcrvn06t2aem

View File

@@ -1,38 +0,0 @@
using Godot;
using System;
public partial class BallSprite : Area2D
{
[Signal]
public delegate void OnHoverEventHandler(BallSprite THIS, bool HOVERED);
[Signal]
public delegate void OnUnhoverEventHandler();
public bool _active = false, _hovered = false, _held = false;
public string _id, _imagePath;
public Vector2I _rackPosition = new Vector2I(0, 0);
public Manager _owner = null;
public void SetSprite(string PATH)
{
_imagePath = PATH;
GetNode<Sprite2D>("Image").Texture = GD.Load<Texture2D>(PATH);
}
private void OnMouseEntered()
{
if (_active)
{
_hovered = true;
EmitSignal(SignalName.OnHover, this, true);
}
}
private void OnMouseExited()
{
if (_active)
{
_hovered = false;
EmitSignal(SignalName.OnHover, this, false);
}
}
}

View File

@@ -1 +0,0 @@
uid://c2rt5f831l1l1

View File

@@ -6,16 +6,9 @@ using System.Linq;
public partial class Battle : Node
{
public bool _current;
public Vector2 _startPosition = new Vector2(890, 340);
public List<Sprite2D> _potted = new();
public List<Ball> _balls = new();
public Table _table;
public List<Pocket> _pockets = new();
public override void _Ready()
{
_table = GetNode<Table>("Table");
_pockets = _table.GetNode<Node2D>("Pockets").GetChildren().Select(n => (Pocket)n).ToList();
}
@@ -27,7 +20,6 @@ public partial class Battle : Node
public void Start()
{
_current = true;
Globals.Instance._currentBattle = this;
}
}

7
Gameplay/Cell.cs Normal file
View File

@@ -0,0 +1,7 @@
using Godot;
using System;
public partial class Cell : Sprite2D
{
public int _row, _column, _size;
}

1
Gameplay/Cell.cs.uid Normal file
View File

@@ -0,0 +1 @@
uid://cmw4772lmwms0

30
Gameplay/Condition.cs Normal file
View File

@@ -0,0 +1,30 @@
using Godot;
using System;
using System.Collections.Generic;
public partial class Condition : Node
{
public bool _canExpire, _expired;
public int _countdown;
public Timer _timer = new();
public Node _target;
public List<Trigger.On> _triggers = new();
public List<Trigger.On> _expirations = new();
public Node2D _owner;
public Condition(Node2D OWNER)
{
_owner = OWNER;
}
public virtual void Fire()
{
}
public virtual void Target(Node TARGET)
{
_target = TARGET;
}
}

View File

@@ -0,0 +1 @@
uid://vj2qucjwah5y

View File

@@ -1,77 +0,0 @@
using Godot;
using System;
public partial class Cue : Sprite2D
{
[Signal]
public delegate void OnShootEventHandler(Vector2 IMPULSE);
public bool _donned = false, _equiped = false, _sending = false;
public float _power = 0.0f, _maxPower = 20.0f;
Vector2 _direction;
public ProgressBar _progressBar;
public override void _Process(double DELTA_)
{
if (!_sending)
{
Vector2 mousePosition = GetViewport().GetMousePosition();
Offset = new Vector2(_power * -10, 0);
LookAt(mousePosition);
if (Input.IsActionJustPressed("scroll_down"))
{
_power = Math.Min(_power + (1f * (Input.IsActionPressed("shift") ? 5 : 1) / (Input.IsActionPressed("ctrl") ? 10 : 1)), _maxPower);
}
else if (Input.IsActionJustPressed("scroll_up"))
{
_power = Math.Max(_power - (1f * (Input.IsActionPressed("shift") ? 5 : 1) / (Input.IsActionPressed("ctrl") ? 10 : 1)), 0);
}
if (Input.IsActionJustReleased("left_click"))
{
if (_power > 0f)
{
_sending = true;
_direction = mousePosition - Position;
}
}
}
else
{
if (Offset.X < 0)
{
Offset = new Vector2(Math.Min(0, Offset.X + _power * 2), 0);
}
else
{
_sending = false;
Offset = Vector2.Zero;
EmitSignal(SignalName.OnShoot, _power * _direction);
_power = 0;
}
}
}
public void Doff()
{
_power = 0;
_donned = false;
SetProcess(false);
Hide();
//_progressBar.Hide();
}
public void Don(Vector2 POSITION)
{
Position = POSITION;
_donned = true;
SetProcess(true);
Show();
//_progressBar.Position = new Vector2(CUEBALL.Position.X - _progressBar.Size.X / 2, CUEBALL.Position.Y + _progressBar.Size.Y / 2);
//_progressBar.Show();
}
}

View File

@@ -1 +0,0 @@
uid://ian15gmia0uv

78
Gameplay/Desk.cs Normal file
View File

@@ -0,0 +1,78 @@
using Godot;
using System;
using System.Collections.Generic;
public partial class Desk : Node2D
{
public Vector2 _topLeft, _cellDimensions, _gridDimensions;
public Cell _light, _dark;
Node2D _grid;
public override void _Ready()
{
_grid = GetNode<Node2D>("Cells");
_light = GetNode<Cell>("Light");
_dark = GetNode<Cell>("Dark");
}
public Cell GetCellFromAddress(int ROW, int COLUMN)
{
if (_grid.HasNode("R" + ROW))
{
Node2D row = _grid.GetNode<Node2D>("R" + ROW);
if (row.HasNode("C" + COLUMN))
{
Cell column = row.GetNode<Cell>("C" + COLUMN);
return column;
}
}
return null;
}
public Vector2 GetPositionFromAddress(int ROW, int COLUMN)
{
Cell cell = GetCellFromAddress(ROW, COLUMN);
if (cell != null)
{
return cell.GlobalPosition;
}
return new Vector2(-1, -1);
}
public void Setup(int ROWS, int COLUMNS, int CELLSIZE)
{
_gridDimensions = new Vector2(COLUMNS, ROWS);
_cellDimensions = new Vector2(CELLSIZE, CELLSIZE);
_light.Scale = _cellDimensions / _light.Texture.GetSize();
_dark.Scale = _cellDimensions / _dark.Texture.GetSize();
_topLeft = Globals.Instance._screenCenter - _cellDimensions * _gridDimensions / 2 + _cellDimensions / 2;
Vector2 position;
Node2D row;
Cell column;
for (int i = 0; i < _gridDimensions.Y; i++)
{
if (i <= _grid.GetChildCount())
{
row = new();
row.Name = "R" + (i + 1);
_grid.AddChild(row);
}
for (int j = 0; j < _gridDimensions.X; j++)
{
position = _topLeft + new Vector2(_cellDimensions.X * j, _cellDimensions.Y * i);
column = (Cell)((i + j) % 2 == 0 ? _light : _dark).Duplicate();
column._size = (int)(column.Texture.GetSize().Y * column.Scale.Y);
column.Name = "C" + (j + 1);
column.GlobalPosition = position;
column.Visible = true;
column._row = i + 1;
column._column = j + 1;
row = _grid.GetNode<Node2D>("R" + (i + 1));
row.AddChild(column);
}
}
}
}

1
Gameplay/Desk.cs.uid Normal file
View File

@@ -0,0 +1 @@
uid://pxi753iie75t

View File

@@ -5,18 +5,20 @@ using System.Collections.Generic;
public partial class Globals : Node
{
public static Globals Instance;
public bool _anyMovement = false;
public bool _battleRunning = false;
public Viewport _viewport;
public Vector2 _screenSize;
public Vector2 _screenCenter;
public Battle _currentBattle;
public Random _random = new();
public PackedScene _workerScene = ResourceLoader.Load<PackedScene>("res://Gameplay/worker.tscn");
public PackedScene _tchotchkeScene = ResourceLoader.Load<PackedScene>("res://Gameplay/tchotchke.tscn");
public override void _Ready()
{
Instance = this;
_viewport = GetViewport();
_screenSize = _viewport.GetVisibleRect().Size;
_screenCenter = _screenSize / 2;
}
}

View File

@@ -15,15 +15,18 @@ public partial class Main : Node
_player = GetNode<Manager>("Player");
_currentBattle.Start();
_player.Start(_currentBattle.GetNode<Table>("Table"));
}
public override void _Process(double DELTA_)
{
public override void _Process(double DELTA_)
{
if (Input.IsActionJustReleased("quit_game"))
{
GetTree().Quit();
}
if (Input.IsActionJustPressed("space"))
{
Globals.Instance._battleRunning = !Globals.Instance._battleRunning;
}
}
}

View File

@@ -4,222 +4,103 @@ using System.Collections.Generic;
using System.Linq;
/// TODO alter code to player vs computer to account for differing logic
public partial class Manager : Node
public partial class Manager : Node2D
{
public bool _dead, _ready;
public int _ballsMoving = 0, _health = 10, _healthMax;
public bool _dead, _ready, _moving;
public int _ballsMoving = 0, _health = 10, _healthMax, _speed = 5;
public string _imagePath;
public Node _hoveredNode = null;
public Node _selectedNode = null;
public CollisionShape2D _startArea;
public Cue _cue;
public ManagerPanel _managerPanel = null;
public BallReturn _ballReturn = null;
public Rack _rack = null;
public Table _table;
public Area2D _kitchen;
public Ball _cueBall;
public BallSprite _cueBallSprite;
public List<Ball> _balls = new();
public List<BallSprite> _ballSprites = new();
public Sprite2D _image;
public Desk _desk = null;
public Cell _cell;
public List<Cell> _moves = new();
public Manager _opponent;
public List<Worker> _workers = new();
public List<Vector2I> _initialRackPositions =
[
new Vector2I(1, 1),
new Vector2I(3, 1),
new Vector2I(4, 1),
new Vector2I(2, 2),
new Vector2I(4, 2),
new Vector2I(1, 3),
new Vector2I(2, 4),
new Vector2I(2, 3),
new Vector2I(2, 1),
new Vector2I(5, 1),
new Vector2I(1, 2),
new Vector2I(3, 2),
new Vector2I(3, 3),
new Vector2I(1, 4),
new Vector2I(1, 5)
];
// denoted by c1r1 notation where (3,1) translates to row 1 column 3
// column 0 represents the ball return where the row represents its order in the return,
// cue ball reserves the position (0,0)
// (0, 1+) denotes a ballin the ball return
// (0,-1+) denotes a ball that is not on the screen, the closer to 0 numbers get placed in the return first if the cool down is equal
// numbers should increase from top to bottom and left to right from the player's perspective
//
// PACKED SCENES
public PackedScene _ballScene = ResourceLoader.Load<PackedScene>("res://Gameplay/ball.tscn");
public PackedScene _ballSpriteScene = ResourceLoader.Load<PackedScene>("res://Gameplay/ball_sprite.tscn");
public PackedScene _cueScene = ResourceLoader.Load<PackedScene>("res://Gameplay/cue.tscn");
public PackedScene _workerScene = ResourceLoader.Load<PackedScene>("res://Gameplay/worker.tscn");
public Node _workerNode;
public Worker _hoveredWorker, _selectedWorker, _heldWorker;
// public List<Tchotchke> _tchotckes = new();
public override void _Ready()
{
_workerNode = GetNode("Workers");
_healthMax = _health;
_cue = GetNode<Cue>("Cue");
_cue.OnShoot += OnCueShoot;
_cue.Doff();
SetSprite("res://art/ness.png");
_managerPanel = GetNode<ManagerPanel>("Panel");
_ballReturn = _managerPanel.GetNode<BallReturn>("BallReturn");
_rack = _managerPanel.GetNode<Rack>("Rack");
// _managerPanel = GetNode<ManagerPanel>("Panel");
_desk = GetNode<Desk>("Desk");
_desk.Setup(15, 20, 50);
_cell = _desk.GetCellFromAddress(1, 1);
AddBall("res://art/cue_ball.png", new Vector2I(0, 0), true);
// _movements.Insert(0, _deskPosition);
_image = GetNode<Sprite2D>("Image");
_image.GlobalPosition = _cell.GlobalPosition;
for (int i = 1; i <= 15; i++)
// _managerPanel.SetManager(this);
for (int i = 0; i < Globals.Instance._random.Next(3, 6); i++)
{
AddBall("res://art/ball_" + i + ".png", _initialRackPositions[i - 1], false);
AddWorker(null);
}
_managerPanel.SetManager(this);
}
public override void _Process(double DELTA_)
{
if (_ballsMoving == 0)
{
if (_cueBall._placed)
{
if (_selectedNode is Ball)
{
if (Input.IsActionJustReleased("right_click"))
{
((Ball)_selectedNode)._selected = false;
_selectedNode = null;
_cue.Doff();
}
if (Input.IsActionJustReleased("left_click") && _cue._power == 0)
{
((Ball)_selectedNode)._selected = false;
_cue.Doff();
if (_hoveredNode != null)
{
_selectedNode = (Ball)_hoveredNode;
((Ball)_selectedNode)._selected = true;
if (_selectedNode == _cueBall)
{
_cue.Don(_cueBall.Position);
}
}
else
{
_selectedNode = null;
}
}
}
else if (_hoveredNode is Ball)
{
if ((Ball)_selectedNode != _hoveredNode && _cue._power == 0)
{
if (Input.IsActionJustReleased("left_click"))
{
_selectedNode = (Ball)_hoveredNode;
((Ball)_selectedNode)._selected = true;
if (_selectedNode == _cueBall)
{
_cue.Don(((Ball)_selectedNode).Position);
}
else
{
_cue.Doff();
}
}
}
}
else if (_selectedNode is BallSprite)
{
Vector2 mousePosition = GetViewport().GetMousePosition();
((BallSprite)_selectedNode).Position = mousePosition;
if (Input.IsActionJustReleased("left_click"))
{
if (!_table._kitchenHovered)
{
PlaceBall(((BallSprite)_selectedNode), mousePosition);
_hoveredNode = null;
_selectedNode = null;
}
}
}
else if (_hoveredNode is BallSprite)
{
if (Input.IsActionJustReleased("left_click"))
{
_selectedNode = (BallSprite)_hoveredNode;
}
}
}
else
{
if (_selectedNode == _cueBallSprite)
{
Vector2 mousePosition = GetViewport().GetMousePosition();
_cueBallSprite.Position = mousePosition;
if (Input.IsActionJustReleased("left_click"))
{
if (_table._kitchenHovered)
{
PlaceBall(_cueBallSprite, mousePosition);
_hoveredNode = null;
_selectedNode = null;
}
}
}
else if (_hoveredNode == _cueBallSprite)
{
if (Input.IsActionJustReleased("left_click"))
{
_selectedNode = _cueBallSprite;
}
}
}
}
ChainMovement();
}
public virtual void AddBall(string IMAGEPATH, Vector2I RACKPOSITION, bool ISCUE)
public void AddWorker(Worker NEWWORKER)
{
Ball newBall;
BallSprite newBallSprite;
Guid ballGuid = Guid.NewGuid();
string ballId = ballGuid.ToString();
Worker newWorker = NEWWORKER ?? Globals.Instance._workerScene.Instantiate<Worker>();
newWorker._cell = _desk.GetCellFromAddress(1, 1);
newWorker.Position = newWorker._cell.GlobalPosition;
newWorker._manager = this;
_workers.Add(newWorker);
_workerNode.AddChild(newWorker);
newBall = _ballScene.Instantiate<Ball>();
newBall.SetSprite(IMAGEPATH);
newBall._rackPosition = RACKPOSITION;
newBall._isCue = ISCUE;
newBall._owner = this;
newBall._id = ballId;
newBall.OnHover += SetHovered;
newBall.OnMovement += MovingChange;
if (newBall._isCue)
// newWorker.SetHovered += SetHoveredWorker;
}
public void ChainMovement()
{
Vector2 direction = Vector2.Zero;
if (Input.IsActionJustPressed("move_up"))
{
_cueBall = newBall;
direction = Vector2.Up;
}
else
else if (Input.IsActionJustPressed("move_down"))
{
_balls.Add(newBall);
direction = Vector2.Down;
}
else if (Input.IsActionJustPressed("move_left"))
{
direction = Vector2.Left;
}
else if (Input.IsActionJustPressed("move_right"))
{
direction = Vector2.Right;
}
newBallSprite = _ballSpriteScene.Instantiate<BallSprite>();
newBallSprite.SetSprite(newBall._imagePath);
newBallSprite._rackPosition = newBall._rackPosition;
newBallSprite._owner = this;
newBallSprite._id = newBall._id;
newBallSprite.OnHover += SetHovered;
if (newBall._isCue)
if (direction != Vector2.Zero)
{
_cueBallSprite = newBallSprite;
GD.Print(_cell._row + (int)direction.Y, _cell._column + (int)direction.X);
Cell newCell = _desk.GetCellFromAddress(_cell._row + (int)direction.Y, _cell._column + (int)direction.X);
if (newCell != null)
{
GD.Print(_cell._row, _cell._column);
if (_moves.Count > 0)
{
for (int i = 0; i < _workers.Count && i < _moves.Count; i++)
{
_workers[i]._cell = _moves[i];
_workers[i].GlobalPosition = _workers[i]._cell.GlobalPosition;
}
}
_cell = newCell;
_moves.Insert(0, newCell);
_image.GlobalPosition = _cell.GlobalPosition;
}
}
else
{
_ballSprites.Add(newBallSprite);
_rack.SetSprite((int)newBallSprite._rackPosition.Y, (int)newBallSprite._rackPosition.X, newBallSprite._imagePath, newBall._id);
}
}
public void ChangeHealth(int CHANGE)
@@ -236,180 +117,9 @@ public partial class Manager : Node
GetNode<ManagerPanel>("Panel").SetValue(_health);
}
public BallSprite GetSpriteFromBall(Ball BALL)
{
BallSprite ballSprite = _cueBallSprite._id == BALL._id ? _cueBallSprite : _ballSprites.Single(b => b._id == BALL._id);
return ballSprite;
}
public Ball GetBallFromSprite(BallSprite BALLSPRITE)
{
Ball ball = _cueBall._id == BALLSPRITE._id ? _cueBall : _balls.Single(b => b._id == BALLSPRITE._id);
return ball;
}
public void MovingChange(Ball BALL, bool MOVING)
{
if (MOVING)
{
_ballsMoving++;
}
else
{
_ballsMoving--;
}
}
public virtual void PlaceBall(BallSprite BALLSSPRITE, Vector2 POSITION)
{
Ball ball = GetBallFromSprite(BALLSSPRITE);
ball._available = true;
ball.Position = POSITION;
ball._active = true;
ball._placed = true;
ball._potted = false;
ball._active = true;
ball.Rotation = 0;
if (!GetChildren().Contains(ball))
{
AddChild(ball);
}
BALLSSPRITE._active = false;
if (GetChildren().Contains(BALLSSPRITE))
{
RemoveChild(BALLSSPRITE);
}
_ballReturn._returnCount = _balls.Where(b => b._potted).ToList().Count;
// _ready = _ballReturn._returnCount > 0;
}
public virtual void PotBall(Ball BALL, Pocket POCKET)
{
BALL.Sleeping = true;
BALL._available = false;
BALL._moving = false;
BALL._active = false;
BALL._placed = false;
BALL._potted = true;
BALL._active = false;
MovingChange(BALL, false);
if (GetChildren().Contains(BALL))
{
RemoveChild(BALL);
}
BallSprite ballSprite = GetSpriteFromBall(BALL);
int pottedCount = _ballReturn._returnCount;
Vector2 position;
if (BALL._isCue)
{
position = _kitchen.GlobalPosition;
}
else
{
position = new Vector2(_ballReturn.GlobalPosition.X + _ballReturn.Size.X / 2, _ballReturn.GlobalPosition.Y + 50 * (pottedCount + 1));
}
ballSprite.Position = position;
ballSprite._active = true;
if (!GetChildren().Contains(ballSprite))
{
CallDeferred(MethodName.AddChild, ballSprite);
}
_ballReturn._returnCount = _balls.Where(b => b._potted).ToList().Count;
// _ready = _ballReturn._returnCount > 0;
}
public void SetHovered(Node NODE, bool HOVERED)
{
if (HOVERED)
{
if (_hoveredNode == null)
{
if (NODE is Ball)
{
_hoveredNode = (Ball)NODE;
}
else if (NODE is BallSprite)
{
_hoveredNode = (BallSprite)NODE;
}
}
}
else
{
_hoveredNode = null;
}
}
// public void SetRack()
// {
// for (int i = 0; i < _ballSprites.Count; i++)
// {
// if ((int)_ballSprites[i]._rackPosition.Y > 0 && (int)_ballSprites[i]._rackPosition.X > 0)
// {
// _rack.SetSprite((int)_ballSprites[i]._rackPosition.Y, (int)_ballSprites[i]._rackPosition.X, _ballSprites[i]._imagePath);
// }
// }
// }
public void SetSprite(string PATH)
{
_imagePath = PATH;
}
public virtual void Start(Table TABLE)
{
_table = TABLE;
int diameter = 36;
int rows = _balls.Max(b => b._rackPosition.Y);
BallSprite rackBallSprite;
int r, c;
for (int i = 0; i < _ballSprites.Count; i++)
{
rackBallSprite = _ballSprites[i];
c = rackBallSprite._rackPosition.X;
r = Math.Abs(rackBallSprite._rackPosition.Y - rows);
if (c > 0)
{
Vector2 position = new Vector2(TABLE.GlobalPosition.X - (r * (diameter / 2)) + ((c - 1) * diameter), TABLE.GlobalPosition.Y - TABLE.Texture.GetSize().Y / 4 - (r * diameter));
PlaceBall(rackBallSprite, position);
}
}
TABLE.OnBallPotted += PotBall;
// PLAYER.PotBall();
// SetRack();
_kitchen = _table.GetNode<Area2D>("Kitchen");
_cueBallSprite.Position = _kitchen.GlobalPosition;
_cueBallSprite._active = true;
AddChild(_cueBallSprite);
}
private void OnCueShoot(Vector2 IMPULSE)
{
if (_selectedNode is Ball)
{
Ball selectedBall = (Ball)_selectedNode;
if (selectedBall != null && selectedBall._placed)
{
selectedBall.ApplyCentralImpulse(IMPULSE);
selectedBall._selected = false;
selectedBall.Launch();
_selectedNode = null;
_cue.Doff();
}
}
}
}

View File

@@ -1,22 +0,0 @@
using Godot;
using System;
public partial class Pocket : Area2D
{
[Signal]
public delegate void OnBallPottedEventHandler(Ball BALL, Pocket THIS);
public override void _Ready()
{
BodyEntered += BallPotted;
}
public void BallPotted(Node NODE)
{
if (NODE is Ball)
{
EmitSignal(SignalName.OnBallPotted, (Ball)NODE, this);
}
}
}

View File

@@ -1 +0,0 @@
uid://cyem70f52xfps

View File

@@ -1,12 +0,0 @@
using Godot;
using System;
public partial class PowerBar : ProgressBar
{
public override void _Process(double DELTA_)
{
// Value = GetParent().GetNode<Manager>("Manager").GetNode<Cue>("Cue")._power / GetParent().GetNode<Manager>("Manager").GetNode<Cue>("Cue")._maxPower * 100;
}
}

View File

@@ -1 +0,0 @@
uid://dbfpn1p62siat

View File

@@ -1,12 +0,0 @@
using Godot;
using System;
public partial class Rack : Sprite2D
{
public void SetSprite(int ROW, int COLUMN, string IMAGEPATH, string ID)
{
BallSprite ballSprite = GetNode<Node2D>("R" + ROW).GetNode<BallSprite>("C" + COLUMN);
ballSprite._id = ID;
ballSprite.SetSprite(IMAGEPATH);
}
}

View File

@@ -1 +0,0 @@
uid://blwghh5lu3w3r

8
Gameplay/Stat.cs Normal file
View File

@@ -0,0 +1,8 @@
using Godot;
using System;
public partial class Stat : Node
{
public int _default, _effective;
}

1
Gameplay/Stat.cs.uid Normal file
View File

@@ -0,0 +1 @@
uid://dqthihtgdvrx8

View File

@@ -1,47 +0,0 @@
using Godot;
using System;
using System.Collections.Generic;
using System.Linq;
public partial class Table : Sprite2D
{
[Signal]
public delegate void OnBallPottedEventHandler(Ball THIS, Pocket POCKET);
public bool _kitchenHovered;
List<Pocket> _pockets;
public override void _Ready()
{
_pockets = GetNode<Node2D>("Pockets")
.GetChildren()
.Select(n => (Pocket)n)
.ToList<Pocket>();
for (int i = 0; i < _pockets.Count; i++)
{
_pockets[i].OnBallPotted += BallPotted;
}
GetNode<Area2D>("Kitchen").MouseEntered += KitchenHovered;
GetNode<Area2D>("Kitchen").MouseExited += KitchenUnhovered;
}
public void BallPotted(Node NODE, Pocket POCKET)
{
if (NODE is Ball)
{
EmitSignal(SignalName.OnBallPotted, (Ball)NODE, POCKET);
}
}
public void KitchenHovered()
{
_kitchenHovered = true;
}
public void KitchenUnhovered()
{
_kitchenHovered = false;
}
}

View File

@@ -1 +0,0 @@
uid://82h0dmyohfj1

92
Gameplay/Tchotchke.cs Normal file
View File

@@ -0,0 +1,92 @@
// using Godot;
// using System;
// using System.Collections.Generic;
// using System.Linq;
// public partial class Tchotchke : StaticBody2D
// {
// public bool _hovered = false, _held = false;
// public List<Action> _actions = new();
// public Node _target;
// public override void _Ready()
// {
// MouseEntered += OnMouseEntered;
// MouseExited += OnMouseExited;
// }
// public override void _Process(double DELTA_)
// {
// if (_held)
// {
// GlobalPosition = GetGlobalMousePosition();
// if (Input.IsActionJustReleased("left_click"))
// {
// Transform2D newTransform = GlobalTransform;
// newTransform.Origin = Position;
// GlobalTransform = newTransform;
// Drop();
// }
// }
// else
// {
// if (_hovered)
// {
// if (Input.IsActionJustPressed("left_click"))
// {
// Hold();
// }
// if (Input.IsActionJustPressed("scroll_up"))
// {
// Rotation -= 1.0f * (float)(Math.PI) / 180.0f;
// }
// if (Input.IsActionJustPressed("scroll_down"))
// {
// Rotation += 1.0f * (float)(Math.PI) / 180.0f;
// }
// }
// }
// }
// public void Drop()
// {
// if (_held)
// {
// _held = false;
// }
// }
// public void FireActions(Trigger.On TRIGGER, Node TARGET = null)
// {
// List<Action> triggeredActions = _actions.Where(e => e._triggers.IndexOf(TRIGGER) > -1).ToList();
// for (int i = 0; i < triggeredActions.Count; i++)
// {
// triggeredActions[i].Target(TARGET);
// triggeredActions[i].Fire();
// }
// List<Action> expiredActions = _actions.Where(e => e._triggers.IndexOf(TRIGGER) > -1).ToList();
// _actions.Except(expiredActions);
// }
// public void Hold()
// {
// if (_held)
// {
// return;
// }
// _held = true;
// }
// // PRIVATE METHODS
// private void OnMouseEntered()
// {
// _hovered = true;
// }
// private void OnMouseExited()
// {
// _hovered = false;
// }
// }

View File

@@ -0,0 +1 @@
uid://qmgo5eukvn6y

View File

@@ -0,0 +1,10 @@
// using Godot;
// using System;
// public partial class AwfullyHotCoffeePot : Tchotchke
// {
// public AwfullyHotCoffeePot() : base()
// {
// // _actions.Add(new Caffeinate(this));
// }
// }

View File

@@ -0,0 +1 @@
uid://cs41fy2tdmox8

View File

@@ -0,0 +1,7 @@
// using Godot;
// using System;
// public partial class RedStapler : Tchotchke
// {
// }

View File

@@ -0,0 +1 @@
uid://suk6jbpwmu1r

View File

@@ -0,0 +1,32 @@
[gd_scene load_steps=5 format=3 uid="uid://cbmpor83jpggo"]
[ext_resource type="Script" uid="uid://cs41fy2tdmox8" path="res://Gameplay/Tchotchkes/AwfullyHotCoffeePot.cs" id="2_mvvpy"]
[ext_resource type="Texture2D" uid="uid://c1tv50tj5cprl" path="res://art/coffee.png" id="3_r4u41"]
[sub_resource type="CircleShape2D" id="CircleShape2D_smj0g"]
radius = 32.0
[sub_resource type="CircleShape2D" id="CircleShape2D_yxdnl"]
radius = 32.0
[node name="AwfullyHotCoffeePot" type="StaticBody2D"]
input_pickable = true
script = ExtResource("2_mvvpy")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.1, 0.1)
texture = ExtResource("3_r4u41")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_smj0g")
[node name="Gravity" type="Area2D" parent="."]
gravity_space_override = 1
gravity_point = true
gravity_point_unit_distance = 32.0
gravity_point_center = Vector2(0, 0)
gravity_direction = Vector2(0, 0)
gravity = 5.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"]
shape = SubResource("CircleShape2D_yxdnl")

View File

@@ -0,0 +1,31 @@
[gd_scene load_steps=4 format=3 uid="uid://bjml4u7mieb3a"]
[ext_resource type="Script" uid="uid://suk6jbpwmu1r" path="res://Gameplay/Tchotchkes/RedStapler.cs" id="2_1dddf"]
[ext_resource type="Texture2D" uid="uid://d332fv8lhg8na" path="res://art/redstapler.png" id="2_rllbf"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_1dddf"]
radius = 29.0
height = 94.0
[node name="RedStapler" type="StaticBody2D"]
input_pickable = true
script = ExtResource("2_1dddf")
[node name="Sprite2D" type="Sprite2D" parent="."]
rotation = -1.0472
scale = Vector2(0.1, 0.1)
texture = ExtResource("2_rllbf")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_1dddf")
[node name="Gravity" type="Area2D" parent="."]
gravity_space_override = 1
gravity_point = true
gravity_point_unit_distance = 32.0
gravity_point_center = Vector2(0, 0)
gravity_direction = Vector2(0, 0)
gravity = 5.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"]
shape = SubResource("CapsuleShape2D_1dddf")

27
Gameplay/Trait.cs Normal file
View File

@@ -0,0 +1,27 @@
using Godot;
using System;
using System.Collections.Generic;
public partial class Trait : Node
{
public Worker _target, _owner;
public List<Trigger.On> _triggers = new();
public List<Trigger.On> _expirations = new();
public Trait(Worker OWNER)
{
_owner = OWNER;
}
public virtual void Fire()
{
}
public virtual void Target(Worker TARGET)
{
_target = TARGET;
}
}

1
Gameplay/Trait.cs.uid Normal file
View File

@@ -0,0 +1 @@
uid://dtccp5uxgkjwm

View File

@@ -0,0 +1,26 @@
using Godot;
using System;
using System.Collections.Generic;
public partial class BasicAttack : Trait
{
public BasicAttack(Worker OWNER) : base(OWNER)
{
_triggers.Add(Trigger.On.Collision);
}
public override void Fire()
{
if (_target != null)
{
if (_target._manager != _owner._manager)
{
int damage = -_owner._aptitude._default / 2;
// target.ChangeHealth(damage, owner);
}
}
_target = null;
}
}

View File

@@ -0,0 +1 @@
uid://2ilonmgvkayp

View File

@@ -0,0 +1,15 @@
using Godot;
using System;
public partial class Caffeinate : Trait
{
public Caffeinate(Worker OWNER) : base(OWNER)
{
_triggers.Add(Trigger.On.Collision);
}
public override void Fire()
{
}
}

View File

@@ -0,0 +1 @@
uid://cbk76ik5o17nx

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://bih70e65g1108"]
[ext_resource type="Script" uid="uid://2ilonmgvkayp" path="res://Gameplay/Traits/BasicAttack.cs" id="1_egsn3"]
[node name="BasicAttack" type="Node"]
script = ExtResource("1_egsn3")

View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://bo2rj0albmkkw"]
[ext_resource type="Script" path="res://Gameplay/Effects/Caffeinate.cs" id="1_l8me6"]
[node name="Caffeinate" type="Node"]
script = ExtResource("1_l8me6")

22
Gameplay/Trigger.cs Normal file
View File

@@ -0,0 +1,22 @@
using Godot;
using System;
public partial class Trigger : Node
{
public Timer _timer;
public int _distance;
public enum On
{
Movement,
Collision,
WallCollision,
Death,
Launch,
Stop,
BattleStart,
BattleEnd,
Critical,
Defend,
Time
}
}

1
Gameplay/Trigger.cs.uid Normal file
View File

@@ -0,0 +1 @@
uid://g0mmh73fptyg

View File

@@ -1,43 +1,185 @@
using Godot;
using System;
using System.Collections.Generic;
using System.Reflection;
using System.Linq;
public partial class Worker : Node2D
public partial class Worker : Area2D
{
[Signal]
public delegate void DamageOverflowEventHandler(int OVERFLOW);
public bool _dead = false, _hovered = false;
public int _health = 5, _healthMax;
// [Signal]
// public delegate void SwapPositionsEventHandler(Worker THIS);
public bool _dead = false, _hovered = false, _held = false, _selected = false;
public int _size, _health, _healthMax;
public float _distanceTraveled, _stamina, _staminaMax;
public Stat _aptitude = new(), _agility = new(), _ardor = new(), _accumen = new(), _awareness = new(), _appeal = new();
public float _rotationalForce = 0;
public Sprite2D _image;
public ProgressBar _healthBar;
public Manager _manager;
public Cell _cell;
public List<Trait> _traits = new();
public override void _Ready()
{
_healthMax = _health;
_size = (int)(((CircleShape2D)GetNode<CollisionShape2D>("Bounds").Shape).Radius);
_aptitude._default = 5;
_agility._default = 5;
_ardor._default = 5;
_accumen._default = 5;
_awareness._default = 5;
_appeal._default = 5;
_aptitude._effective = _aptitude._default;
_agility._effective = _agility._default;
_ardor._effective = _ardor._default;
_accumen._effective = _accumen._default;
_awareness._effective = _awareness._default;
_appeal._effective = _appeal._default;
_image = GetNode<Sprite2D>("Sprite2D");
_traits.Add(new BasicAttack(this));
// _healthBar = GetNode<ProgressBar>("HealthBar");
// _healthBar.MaxValue = _healthMax;
// _healthBar.Value = _health;
}
public virtual void ChangeDefense(int CHANGE)
public override void _Process(double DELTA_)
{
_health += CHANGE;
_health = Math.Min(_health, _healthMax);
if (_health < 0)
if (_hovered)
{
EmitSignal(SignalName.DamageOverflow, _health);
_health = 0;
if (Input.IsActionJustPressed("left_click"))
{
Hold();
}
}
if (_held)
{
GlobalPosition = GetGlobalMousePosition();
if (Input.IsActionJustReleased("left_click"))
{
Drop();
}
}
}
// public void ChangeHealth(int CHANGE, Node CHANGEMAKER)
// {
// if (_health <= 0 && CHANGE < 0)
// {
// // knock the piece off the board and out for the round!
// // process on knockout
// }
// _health += CHANGE;
// _healthBar.Value = _health;
// if (_health <= 0)
// {
// Sleeping = true;
// _dead = true;
// _health = 0;
// FireActions(Trigger.On.Death, _manager);
// }
// }
public void Drop()
{
if (_held)
{
_held = false;
GlobalPosition = _cell.GlobalPosition;
}
}
public void SetSprite(string PATH)
public void FireActions(Trigger.On TRIGGER, Worker TARGET = null)
{
GetNode<Sprite2D>("Image").Texture = GD.Load<Texture2D>(PATH);
for (int i = 0; i < _traits.Count; i++)
{
if (_traits[i]._triggers.Contains(TRIGGER))
{
_traits[i].Target(TARGET);
_traits[i].Fire();
}
}
}
// Processes
// public virtual void ProcessOnCollision(Ball TARGET)
// public bool HasCondition(string CONDITION)
// {
// Worker TARGETWORKER = TARGET.GetParent<Worker>();
// if (_launched)
// List<string> conditionNames = _conditions.GetChildren().Select(c => c.GetType().ToString()).ToList();
// return conditionNames.Contains(CONDITION);
// }
public void Hold()
{
if (_held)
{
return;
}
_held = true;
}
public void ResetStats()
{
_aptitude._effective = _aptitude._default;
_agility._effective = _agility._default;
_ardor._effective = _ardor._default;
_accumen._effective = _accumen._default;
_awareness._effective = _awareness._default;
_appeal._effective = _appeal._default;
}
public void SwapWith(Worker OTHERWORKER)
{
Cell thisCell = _cell, otherCell = OTHERWORKER._cell;
OTHERWORKER.GlobalPosition = thisCell.GlobalPosition;
_cell = otherCell;
OTHERWORKER._cell = thisCell;
int indexA = _manager._workers.IndexOf(this), indexB = _manager._workers.IndexOf(OTHERWORKER);
Worker placeholder = this;
_manager._workers[indexA] = OTHERWORKER;
_manager._workers[indexB] = placeholder;
}
// PRIVATE METHODS
private void OnAreaEntered(Area2D AREA)
{
if (AREA is Worker)
{
if (_held)
{
SwapWith((Worker)AREA);
}
}
}
private void OnMouseEntered()
{
_hovered = true;
}
private void OnMouseExited()
{
_hovered = false;
}
// private void OnBodyEntered(Node NODE)
// {
// if (NODE is Worker)
// {
// TARGETWORKER.ChangeDefense(-3);
// FireActions(Trigger.On.Collision, NODE);
// _rotationalForce *= 0.8f;
// Vector2 rotatedForce = LinearVelocity.Rotated(((Worker)NODE)._rotationalForce);
// ApplyCentralForce(rotatedForce);
// }
// else if (NODE is Tchotchke)
// {
// Tchotchke tchotchke = (Tchotchke)NODE;
// tchotchke.FireActions(Trigger.On.Collision, this);
// }
// }

View File

@@ -1 +1 @@
uid://b4mr2vn8mw6r4
uid://bk6qk4rjmsvtn

View File

@@ -1,38 +0,0 @@
[gd_scene load_steps=6 format=3 uid="uid://c8n4lue2bn25n"]
[ext_resource type="Script" uid="uid://dgdxx8tceiljg" path="res://Gameplay/Ball.cs" id="1_7ritg"]
[ext_resource type="Shader" uid="uid://b6vvt5o0008ob" path="res://shaders/globe.gdshader" id="2_6v01e"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_yj7wd"]
bounce = 5.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_yj7wd"]
shader = ExtResource("2_6v01e")
shader_parameter/scroll_x = 0.0
shader_parameter/scroll_y = 0.0
shader_parameter/rotation = 0.0
shader_parameter/globe_magnitude = 0.0
[sub_resource type="CircleShape2D" id="CircleShape2D_803qd"]
radius = 18.0
[node name="Ball" type="RigidBody2D" groups=["balls"]]
z_index = 1
input_pickable = true
physics_material_override = SubResource("PhysicsMaterial_yj7wd")
continuous_cd = 2
contact_monitor = true
max_contacts_reported = 1
script = ExtResource("1_7ritg")
[node name="Image" type="Sprite2D" parent="."]
texture_filter = 1
material = SubResource("ShaderMaterial_yj7wd")
[node name="Bounds" type="CollisionShape2D" parent="."]
position = Vector2(0, -7.10543e-15)
shape = SubResource("CircleShape2D_803qd")
[connection signal="body_entered" from="." to="." method="OnBodyEntered"]
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]

View File

@@ -1,13 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://bfxav1txgaxo5"]
[ext_resource type="Script" uid="uid://bbcrvn06t2aem" path="res://Gameplay/BallReturn.cs" id="1_omsmb"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_3x8cv"]
bg_color = Color(0.501407, 0.501406, 0.501406, 1)
[node name="BallReturn" type="Panel"]
offset_right = 75.0
offset_bottom = 800.0
mouse_filter = 2
theme_override_styles/panel = SubResource("StyleBoxFlat_3x8cv")
script = ExtResource("1_omsmb")

View File

@@ -1,18 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://tmer0me1qpaa"]
[ext_resource type="Script" uid="uid://c2rt5f831l1l1" path="res://Gameplay/BallSprite.cs" id="1_bwons"]
[sub_resource type="CircleShape2D" id="CircleShape2D_vjx3o"]
radius = 18.0
[node name="BallSprite" type="Area2D"]
z_index = 2
script = ExtResource("1_bwons")
[node name="Image" type="Sprite2D" parent="."]
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_vjx3o")
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]

View File

@@ -1,10 +1,6 @@
[gd_scene load_steps=3 format=3 uid="uid://5ymxo45j4ryt"]
[gd_scene load_steps=2 format=3 uid="uid://5ymxo45j4ryt"]
[ext_resource type="Script" uid="uid://0c1u4l8lu07h" path="res://Gameplay/Battle.cs" id="1_i431l"]
[ext_resource type="PackedScene" uid="uid://dsprg4uahkylm" path="res://Gameplay/table.tscn" id="2_fkh6t"]
[node name="Battle" type="Node" groups=["battles"]]
script = ExtResource("1_i431l")
[node name="Table" parent="." instance=ExtResource("2_fkh6t")]
position = Vector2(960, 540)

6
Gameplay/cell.tscn Normal file
View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://b7yrd35gvisom"]
[ext_resource type="Script" path="res://Gameplay/Cell.cs" id="1_kyub7"]
[node name="Cell" type="Sprite2D"]
script = ExtResource("1_kyub7")

View File

@@ -1,9 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://cyvwahpr2gqi6"]
[ext_resource type="Script" path="res://Gameplay/ComputerManager.cs" id="1_rwbwa"]
[ext_resource type="PackedScene" uid="uid://dm4xk16ce0j" path="res://Gameplay/cue.tscn" id="4_ugtcs"]
[node name="ComputerManager" type="Node"]
script = ExtResource("1_rwbwa")
[node name="Cue" parent="." instance=ExtResource("4_ugtcs")]

6
Gameplay/condition.tscn Normal file
View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dsrjrwd1eyeu3"]
[ext_resource type="Script" path="res://Gameplay/Condition.cs" id="1_s3ntn"]
[node name="Condition" type="Node"]
script = ExtResource("1_s3ntn")

View File

@@ -1,10 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://dm4xk16ce0j"]
[ext_resource type="Texture2D" uid="uid://qs3fa665l8x2" path="res://art/cue.png" id="1_ujx86"]
[ext_resource type="Script" uid="uid://ian15gmia0uv" path="res://Gameplay/Cue.cs" id="2_dtogv"]
[node name="Cue" type="Sprite2D"]
z_index = 99
texture_filter = 1
texture = ExtResource("1_ujx86")
script = ExtResource("2_dtogv")

21
Gameplay/desk.tscn Normal file
View File

@@ -0,0 +1,21 @@
[gd_scene load_steps=4 format=3 uid="uid://demwh8ek37mnx"]
[ext_resource type="Script" uid="uid://pxi753iie75t" path="res://Gameplay/Desk.cs" id="2_15p4t"]
[ext_resource type="Texture2D" uid="uid://dy4lmwn1dit26" path="res://art/shade.png" id="2_21bwm"]
[ext_resource type="PackedScene" uid="uid://b7yrd35gvisom" path="res://Gameplay/cell.tscn" id="2_ucfrb"]
[node name="Desk" type="Node2D"]
script = ExtResource("2_15p4t")
[node name="Light" parent="." instance=ExtResource("2_ucfrb")]
visible = false
scale = Vector2(0.195, 0.195)
texture = ExtResource("2_21bwm")
[node name="Dark" parent="." instance=ExtResource("2_ucfrb")]
visible = false
modulate = Color(0, 0, 0, 1)
scale = Vector2(0.195, 0.195)
texture = ExtResource("2_21bwm")
[node name="Cells" type="Node2D" parent="."]

View File

@@ -1,30 +1,15 @@
[gd_scene load_steps=7 format=3 uid="uid://cdaxqopr35lll"]
[gd_scene load_steps=5 format=3 uid="uid://cdaxqopr35lll"]
[ext_resource type="Script" uid="uid://b66ysicyh0m1s" path="res://Gameplay/Manager.cs" id="1_ivgep"]
[ext_resource type="Script" uid="uid://dbfpn1p62siat" path="res://Gameplay/PowerBar.cs" id="2_2skxn"]
[ext_resource type="PackedScene" uid="uid://demwh8ek37mnx" path="res://Gameplay/desk.tscn" id="3_muxv4"]
[ext_resource type="PackedScene" uid="uid://8kv00jc35dma" path="res://Gameplay/manager_panel.tscn" id="3_xooeg"]
[ext_resource type="PackedScene" uid="uid://dm4xk16ce0j" path="res://Gameplay/cue.tscn" id="4_bcsor"]
[ext_resource type="Texture2D" uid="uid://n0e2tlnwq3e2" path="res://art/manager.png" id="4_2skxn"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_8y33v"]
bg_color = Color(1, 1, 1, 0.458824)
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_vnsqa"]
bg_color = Color(0.92549, 0.0901961, 0.0627451, 1)
[node name="Manager" type="Node"]
[node name="Manager" type="Node2D"]
script = ExtResource("1_ivgep")
[node name="PowerBar" type="ProgressBar" parent="."]
visible = false
z_index = 1
offset_right = 100.0
offset_bottom = 30.0
theme_override_styles/background = SubResource("StyleBoxFlat_8y33v")
theme_override_styles/fill = SubResource("StyleBoxFlat_vnsqa")
show_percentage = false
script = ExtResource("2_2skxn")
[node name="Panel" parent="." instance=ExtResource("3_xooeg")]
visible = false
offset_left = 101.0
offset_top = 150.0
offset_right = 551.0
@@ -32,4 +17,10 @@ offset_bottom = 280.0
grow_horizontal = 1
grow_vertical = 1
[node name="Cue" parent="." instance=ExtResource("4_bcsor")]
[node name="Workers" type="Node" parent="."]
[node name="Desk" parent="." instance=ExtResource("3_muxv4")]
[node name="Image" type="Sprite2D" parent="."]
scale = Vector2(0.5, 0.5)
texture = ExtResource("4_2skxn")

View File

@@ -1,8 +1,6 @@
[gd_scene load_steps=9 format=3 uid="uid://8kv00jc35dma"]
[gd_scene load_steps=7 format=3 uid="uid://8kv00jc35dma"]
[ext_resource type="Script" uid="uid://c4ekvurl6q7jn" path="res://Gameplay/ManagerPanel.cs" id="1_8n1hc"]
[ext_resource type="PackedScene" uid="uid://cudhpkje2ax2g" path="res://Gameplay/rack.tscn" id="2_20uuj"]
[ext_resource type="PackedScene" uid="uid://bfxav1txgaxo5" path="res://Gameplay/ball_return.tscn" id="3_sx67n"]
[sub_resource type="StyleBoxFlat" id="StyleBoxFlat_e1ofl"]
bg_color = Color(1, 1, 1, 1)
@@ -130,99 +128,47 @@ theme_override_styles/panel = SubResource("StyleBoxFlat_j2own")
[node name="T1" type="Panel" parent="Team"]
layout_mode = 0
offset_left = 79.0
offset_top = 28.0
offset_right = 129.0
offset_bottom = 78.0
offset_left = 63.0
offset_top = 26.0
offset_right = 213.0
offset_bottom = 176.0
theme_override_styles/panel = SubResource("StyleBoxFlat_058dj")
[node name="Image" type="Sprite2D" parent="Team/T1"]
position = Vector2(25, 25)
position = Vector2(75, 75)
[node name="T2" type="Panel" parent="Team"]
layout_mode = 0
offset_left = 154.0
offset_left = 237.0
offset_top = 28.0
offset_right = 204.0
offset_bottom = 78.0
offset_right = 387.0
offset_bottom = 178.0
theme_override_styles/panel = SubResource("StyleBoxFlat_058dj")
[node name="Image" type="Sprite2D" parent="Team/T2"]
position = Vector2(25, 25)
position = Vector2(75, 75)
[node name="T3" type="Panel" parent="Team"]
layout_mode = 0
offset_left = 229.0
offset_top = 28.0
offset_right = 279.0
offset_bottom = 78.0
offset_left = 60.0
offset_top = 194.0
offset_right = 210.0
offset_bottom = 344.0
theme_override_styles/panel = SubResource("StyleBoxFlat_058dj")
[node name="Image" type="Sprite2D" parent="Team/T3"]
position = Vector2(25, 25)
position = Vector2(75, 75)
[node name="T4" type="Panel" parent="Team"]
layout_mode = 0
offset_left = 304.0
offset_top = 28.0
offset_right = 354.0
offset_bottom = 78.0
offset_left = 237.0
offset_top = 196.0
offset_right = 387.0
offset_bottom = 346.0
theme_override_styles/panel = SubResource("StyleBoxFlat_058dj")
[node name="Image" type="Sprite2D" parent="Team/T4"]
position = Vector2(25, 25)
[node name="T5" type="Panel" parent="Team"]
layout_mode = 0
offset_left = 79.0
offset_top = 103.0
offset_right = 129.0
offset_bottom = 153.0
theme_override_styles/panel = SubResource("StyleBoxFlat_058dj")
[node name="Image" type="Sprite2D" parent="Team/T5"]
position = Vector2(25, 25)
[node name="T6" type="Panel" parent="Team"]
layout_mode = 0
offset_left = 154.0
offset_top = 103.0
offset_right = 204.0
offset_bottom = 153.0
theme_override_styles/panel = SubResource("StyleBoxFlat_058dj")
[node name="Image" type="Sprite2D" parent="Team/T6"]
position = Vector2(25, 25)
[node name="T7" type="Panel" parent="Team"]
layout_mode = 0
offset_left = 229.0
offset_top = 103.0
offset_right = 279.0
offset_bottom = 153.0
theme_override_styles/panel = SubResource("StyleBoxFlat_058dj")
[node name="Image" type="Sprite2D" parent="Team/T7"]
position = Vector2(25, 25)
[node name="T8" type="Panel" parent="Team"]
layout_mode = 0
offset_left = 304.0
offset_top = 103.0
offset_right = 354.0
offset_bottom = 153.0
theme_override_styles/panel = SubResource("StyleBoxFlat_058dj")
[node name="Image" type="Sprite2D" parent="Team/T8"]
position = Vector2(25, 25)
[node name="Rack" parent="." instance=ExtResource("2_20uuj")]
position = Vector2(107, 346)
[node name="BallReturn" parent="." instance=ExtResource("3_sx67n")]
layout_mode = 0
offset_left = 475.0
offset_right = 550.0
position = Vector2(75, 75)
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]

View File

@@ -1,208 +0,0 @@
//using Godot;
//using System;
//
//public partial class Ball : RigidBody2D
//{
//[Signal]
//public delegate void HoverEventHandler(bool tf = true);
//[Signal]
//public delegate void SelectEventHandler(bool tf = true);
//[Signal]
//public delegate void AimEventHandler(bool tf = true);
//[Signal]
//public delegate void LaunchEventHandler(bool tf = true);
//[Signal]
//public delegate void MoveEventHandler(bool tf = true);
//[Signal]
//public delegate void BumpMarbleEventHandler(Ball ball);
//[Signal]
//public delegate void DefenseDownEventHandler(int damage);
//
//public bool _holding, _placed, _hovered, _selected, _aimed, _launched, _moving;
//public int _defense, _defenseMax, _speed;
//public Vector2 _force, _velocity, _screenSize;
//
//
//public override void _Ready()
//{
//_holding = false;
//_placed = true;
//_hovered = false;
//_selected = false;
//_aimed = false;
//_launched = false;
//_moving = false;
//_defense = 10;
//_defenseMax = _defense;
//_speed = 400;
//_force = new Vector2(0,0);
//_velocity = new Vector2(0,0);
//_screenSize = GetViewportRect().Size;
//
////Hide();
//}
//
//public override void _PhysicsProcess(double delta) //THIS IS LIKE THE UPDATE FUNCTION
//{
//if (_placed)
//{
//TrySelect();
//TryAim();
//TryLaunch();
//TryMovement(delta);
//}
//else if (_holding)
//{
//GetNode<CollisionShape2D>("Bounds").Disabled = true;
//Vector2 mousePosition = GetGlobalMousePosition();
//if (Input.IsActionJustReleased("left_click"))
//{
//Start(mousePosition);
//}
//}
//}
//
//public void DefenseChange(int change)
//{
//_defense += change;
//if (_defense < 0)
//{
//EmitSignal(SignalName.DefenseDown); // transfer damage over 0 to player
//_defense = 0; // set defense back to 0
//}
//}
//
//public void Start(Vector2 position)
//{
//
//_holding = false;
//_placed = true;
//Position = position;
//Show();
//GetNode<CollisionShape2D>("Bounds").Disabled = false;
//}
//
//public void TryAim()
//{
//if (_selected && Input.IsActionPressed("left_click") && ! _hovered && !_aimed)
//{
//_aimed = true;
//EmitSignal(SignalName.Aim);
//}
//
//if (_aimed)
//{
//Vector2 mousePosition = GetGlobalMousePosition();
//_force = (Position - mousePosition) /6;
//
//if (!Input.IsActionPressed("left_click"))
//{
//if (!_hovered)
//{
//_launched = true;
//EmitSignal(SignalName.Select, false);
//}
//else
//{
//_aimed = false;
//EmitSignal(SignalName.Aim, false);
//}
//}
//}
//}
//
//public void TryLaunch()
//{
//if (_aimed && Input.IsActionJustReleased("left_click"))
//{
//_selected = false;
//EmitSignal(SignalName.Select, false);
//
//_aimed = false;
//EmitSignal(SignalName.Aim, false);
//
//_launched = true;
//EmitSignal(SignalName.Launch);
//
//ApplyCentralForce(_force * _speed);
//_force = Vector2.Zero;
//}
//}
//
//public void TryMovement(double delta)
//{
//if (LinearVelocity.Length() > 0 && !Sleeping)
//{
//if (!_moving)
//{
//_moving = true;
//EmitSignal(SignalName.Move);
//}
//}
//if (_moving)
//{
////Vector2 Scroll = -LinearVelocity / 100;
////
////Sprite2D sprite = (Sprite2D)GetNode("Texture");
////ShaderMaterial material = (ShaderMaterial)sprite.Material;
////
////float CurrentScrollX = (float)material.GetShaderParameter("scroll_x");
////material.SetShaderParameter("scroll_x", (CurrentScrollX + Scroll.X * (float)delta) % 1.0f);
////
////float CurrentScrollY = (float)material.GetShaderParameter("scroll_y");
////material.SetShaderParameter("scroll_y", (CurrentScrollY + Scroll.Y * (float)delta) % 1.0f);
//
//
//if (Sleeping)
//{
//_launched = false;
//_moving = false;
//EmitSignal(SignalName.Move, false);
//}
//}
//}
//
//public void TrySelect()
//{
//if ( _hovered)
//{
//if (Input.IsActionJustPressed("left_click") && !_selected)
//{
//_selected = true;
//EmitSignal(SignalName.Select);
//}
//}
//
//if (_selected)
//{
//if (!_hovered)
//{
//if (Input.IsActionJustPressed("left_click") && _selected)
//{
//_selected = false;
//EmitSignal(SignalName.Select, false);
//}
//}
//}
//}
//
//private void OnMouseEntered()
//{
//_hovered = true;
//EmitSignal(SignalName.Hover);
//}
//
//private void OnMouseExited()
//{
//_hovered = false;
//EmitSignal(SignalName.Hover, false);
//}
//
//private void OnBodyEntered(Node2D body)
//{
//if (body.GetType() == typeof(Ball))
//{
//EmitSignal(SignalName.BumpMarble, (Ball)body);
//}
//}
//}

View File

@@ -1 +0,0 @@
uid://2rh2m60aldei

View File

@@ -1,13 +0,0 @@
[gd_scene load_steps=3 format=3 uid="uid://dl1qsemhbxaoh"]
[ext_resource type="Script" uid="uid://cyem70f52xfps" path="res://Gameplay/Pocket.cs" id="1_f316g"]
[sub_resource type="CapsuleShape2D" id="CapsuleShape2D_kcs3t"]
radius = 74.0
height = 264.0
[node name="Pocket" type="Area2D"]
script = ExtResource("1_f316g")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CapsuleShape2D_kcs3t")

View File

@@ -1,70 +0,0 @@
[gd_scene load_steps=4 format=3 uid="uid://cudhpkje2ax2g"]
[ext_resource type="Texture2D" uid="uid://cgnwfc387vche" path="res://art/rack.png" id="1_re2um"]
[ext_resource type="Script" uid="uid://blwghh5lu3w3r" path="res://Gameplay/Rack.cs" id="2_tsiik"]
[ext_resource type="PackedScene" uid="uid://tmer0me1qpaa" path="res://Gameplay/ball_sprite.tscn" id="3_ydd72"]
[node name="Rack" type="Sprite2D"]
texture = ExtResource("1_re2um")
centered = false
script = ExtResource("2_tsiik")
[node name="R1" type="Node2D" parent="."]
position = Vector2(0, 4)
[node name="C1" parent="R1" instance=ExtResource("3_ydd72")]
position = Vector2(37, 15)
[node name="C2" parent="R1" instance=ExtResource("3_ydd72")]
position = Vector2(73, 15)
[node name="C3" parent="R1" instance=ExtResource("3_ydd72")]
position = Vector2(109, 15)
[node name="C4" parent="R1" instance=ExtResource("3_ydd72")]
position = Vector2(145, 15)
[node name="C5" parent="R1" instance=ExtResource("3_ydd72")]
position = Vector2(181, 15)
[node name="R2" type="Node2D" parent="."]
position = Vector2(0, 4)
[node name="C1" parent="R2" instance=ExtResource("3_ydd72")]
position = Vector2(55, 46)
[node name="C2" parent="R2" instance=ExtResource("3_ydd72")]
position = Vector2(91, 46)
[node name="C3" parent="R2" instance=ExtResource("3_ydd72")]
position = Vector2(127, 46)
[node name="C4" parent="R2" instance=ExtResource("3_ydd72")]
position = Vector2(163, 46)
[node name="R3" type="Node2D" parent="."]
position = Vector2(0, 4)
[node name="C1" parent="R3" instance=ExtResource("3_ydd72")]
position = Vector2(73, 77)
[node name="C2" parent="R3" instance=ExtResource("3_ydd72")]
position = Vector2(109, 77)
[node name="C3" parent="R3" instance=ExtResource("3_ydd72")]
position = Vector2(145, 77)
[node name="R4" type="Node2D" parent="."]
position = Vector2(0, 4)
[node name="C1" parent="R4" instance=ExtResource("3_ydd72")]
position = Vector2(91, 108)
[node name="C2" parent="R4" instance=ExtResource("3_ydd72")]
position = Vector2(127, 108)
[node name="R5" type="Node2D" parent="."]
position = Vector2(0, 4)
[node name="C1" parent="R5" instance=ExtResource("3_ydd72")]
position = Vector2(109, 139)

6
Gameplay/stat.tscn Normal file
View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://b8rfuerwno7h1"]
[ext_resource type="Script" uid="uid://dqthihtgdvrx8" path="res://Gameplay/Stat.cs" id="1_kb7kj"]
[node name="Stat" type="Node"]
script = ExtResource("1_kb7kj")

View File

@@ -1,49 +0,0 @@
[gd_scene load_steps=7 format=3 uid="uid://yr7ufhp84bfa"]
[ext_resource type="Script" path="res://Gameplay/SupportBall.cs" id="2_4wdnc"]
[ext_resource type="Shader" uid="uid://b6vvt5o0008ob" path="res://shaders/globe.gdshader" id="2_jnwku"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_yj7wd"]
bounce = 5.0
[sub_resource type="ShaderMaterial" id="ShaderMaterial_yj7wd"]
shader = ExtResource("2_jnwku")
shader_parameter/scroll_x = 0.0
shader_parameter/scroll_y = 0.0
shader_parameter/rotation = 0.0
shader_parameter/globe_magnitude = 0.0
[sub_resource type="CircleShape2D" id="CircleShape2D_803qd"]
radius = 18.0
[sub_resource type="CircleShape2D" id="CircleShape2D_4wdnc"]
radius = 18.0
[node name="SupportBall" type="RigidBody2D" groups=["balls"]]
z_index = 1
input_pickable = true
physics_material_override = SubResource("PhysicsMaterial_yj7wd")
continuous_cd = 2
contact_monitor = true
max_contacts_reported = 1
script = ExtResource("2_4wdnc")
[node name="Image" type="Sprite2D" parent="."]
texture_filter = 1
material = SubResource("ShaderMaterial_yj7wd")
[node name="Bounds" type="CollisionShape2D" parent="."]
position = Vector2(0, -7.10543e-15)
shape = SubResource("CircleShape2D_803qd")
[node name="Area2D" type="Area2D" parent="."]
disable_mode = 2
[node name="CollisionShape2D" type="CollisionShape2D" parent="Area2D"]
shape = SubResource("CircleShape2D_4wdnc")
[connection signal="body_entered" from="." to="." method="OnBodyEntered"]
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]
[connection signal="mouse_entered" from="Area2D" to="." method="OnMouseEntered"]
[connection signal="mouse_exited" from="Area2D" to="." method="OnMouseExited"]

View File

@@ -1,84 +0,0 @@
[gd_scene load_steps=6 format=3 uid="uid://dsprg4uahkylm"]
[ext_resource type="Texture2D" uid="uid://brbok0al4e1ab" path="res://art/tableTemplate.png" id="1_s3o1g"]
[ext_resource type="Script" uid="uid://82h0dmyohfj1" path="res://Gameplay/Table.cs" id="1_v5i0k"]
[ext_resource type="PackedScene" uid="uid://dl1qsemhbxaoh" path="res://Gameplay/pocket.tscn" id="3_3wy0c"]
[sub_resource type="PhysicsMaterial" id="PhysicsMaterial_v5i0k"]
bounce = 1.0
absorbent = true
[sub_resource type="RectangleShape2D" id="RectangleShape2D_s3o1g"]
size = Vector2(394, 182)
[node name="Table" type="Sprite2D"]
texture_filter = 1
texture = ExtResource("1_s3o1g")
script = ExtResource("1_v5i0k")
[node name="Cushions" type="Node2D" parent="."]
[node name="TL" type="StaticBody2D" parent="Cushions"]
physics_material_override = SubResource("PhysicsMaterial_v5i0k")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Cushions/TL"]
position = Vector2(-600, -339)
polygon = PackedVector2Array(160, -87, 360, -86, 380, -64, 379, 303, 360, 314, 158, 314)
[node name="TR" type="StaticBody2D" parent="Cushions"]
physics_material_override = SubResource("PhysicsMaterial_v5i0k")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Cushions/TR"]
polygon = PackedVector2Array(220, -404, 240, -427, 449, -427, 448, -26, 241, -26, 220, -36)
[node name="BL" type="StaticBody2D" parent="Cushions"]
physics_material_override = SubResource("PhysicsMaterial_v5i0k")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Cushions/BL"]
polygon = PackedVector2Array(-221, 35, -240, 24, -436, 25, -434, 425, -241, 426, -221, 405)
[node name="BR" type="StaticBody2D" parent="Cushions"]
physics_material_override = SubResource("PhysicsMaterial_v5i0k")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Cushions/BR"]
polygon = PackedVector2Array(219, 36, 239, 24, 447, 24, 448, 426, 240, 426, 219, 403)
[node name="B" type="StaticBody2D" parent="Cushions"]
physics_material_override = SubResource("PhysicsMaterial_v5i0k")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Cushions/B"]
polygon = PackedVector2Array(-186, 440, -206, 459, -207, 644, 206, 655, 205, 460, 186, 440)
[node name="T" type="StaticBody2D" parent="Cushions"]
physics_material_override = SubResource("PhysicsMaterial_v5i0k")
[node name="CollisionPolygon2D" type="CollisionPolygon2D" parent="Cushions/T"]
polygon = PackedVector2Array(-186, -441, -206, -459, -206, -630, 205, -631, 205, -459, 186, -440)
[node name="Pockets" type="Node2D" parent="."]
[node name="TL" parent="Pockets" instance=ExtResource("3_3wy0c")]
position = Vector2(-282, -557)
[node name="TR" parent="Pockets" instance=ExtResource("3_3wy0c")]
position = Vector2(281, -559)
[node name="R" parent="Pockets" instance=ExtResource("3_3wy0c")]
position = Vector2(373, -3)
rotation = 1.5708
[node name="BR" parent="Pockets" instance=ExtResource("3_3wy0c")]
position = Vector2(279, 557)
[node name="BL" parent="Pockets" instance=ExtResource("3_3wy0c")]
position = Vector2(-280, 557)
[node name="L" parent="Pockets" instance=ExtResource("3_3wy0c")]
position = Vector2(-373, 4)
rotation = 1.5708
[node name="Kitchen" type="Area2D" parent="."]
position = Vector2(-1, 312)
[node name="CollisionShape2D" type="CollisionShape2D" parent="Kitchen"]
shape = SubResource("RectangleShape2D_s3o1g")

32
Gameplay/tchotchke.tscn Normal file
View File

@@ -0,0 +1,32 @@
[gd_scene load_steps=5 format=3 uid="uid://6gr5saa81qdh"]
[ext_resource type="Script" uid="uid://qmgo5eukvn6y" path="res://Gameplay/Tchotchke.cs" id="1_c08fi"]
[ext_resource type="Texture2D" uid="uid://c1tv50tj5cprl" path="res://art/coffee.png" id="2_gl5mj"]
[sub_resource type="CircleShape2D" id="CircleShape2D_gl5mj"]
radius = 32.0
[sub_resource type="CircleShape2D" id="CircleShape2D_d82wc"]
radius = 32.0
[node name="Tchotchke" type="StaticBody2D"]
input_pickable = true
script = ExtResource("1_c08fi")
[node name="Sprite2D" type="Sprite2D" parent="."]
scale = Vector2(0.1, 0.1)
texture = ExtResource("2_gl5mj")
[node name="CollisionShape2D" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_gl5mj")
[node name="Gravity" type="Area2D" parent="."]
gravity_space_override = 1
gravity_point = true
gravity_point_unit_distance = 32.0
gravity_point_center = Vector2(0, 0)
gravity_direction = Vector2(0, 0)
gravity = 5.0
[node name="CollisionShape2D" type="CollisionShape2D" parent="Gravity"]
shape = SubResource("CircleShape2D_d82wc")

6
Gameplay/trait.tscn Normal file
View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dti20yu8jfujq"]
[ext_resource type="Script" uid="uid://dtccp5uxgkjwm" path="res://Gameplay/Trait.cs" id="1_wtks1"]
[node name="Trait" type="Node"]
script = ExtResource("1_wtks1")

6
Gameplay/trigger.tscn Normal file
View File

@@ -0,0 +1,6 @@
[gd_scene load_steps=2 format=3 uid="uid://dufkmbuxx2h41"]
[ext_resource type="Script" uid="uid://g0mmh73fptyg" path="res://Gameplay/Trigger.cs" id="1_opbo1"]
[node name="Trigger" type="Node"]
script = ExtResource("1_opbo1")

View File

@@ -1,9 +1,33 @@
[gd_scene load_steps=2 format=3 uid="uid://72tgm5p8d32r"]
[gd_scene load_steps=4 format=3 uid="uid://37hjd4v3p42o"]
[ext_resource type="Script" uid="uid://b4mr2vn8mw6r4" path="res://Gameplay/Worker.cs" id="1_e314i"]
[ext_resource type="Script" path="res://Gameplay/Worker.cs" id="1_e314i"]
[ext_resource type="Texture2D" uid="uid://dmispjd3fmmks" path="res://art/worker_test.png" id="2_m3kx1"]
[node name="Worker" type="Node2D"]
[sub_resource type="CircleShape2D" id="CircleShape2D_4poc8"]
radius = 16.0
[node name="Worker" type="Area2D"]
script = ExtResource("1_e314i")
[node name="Sprite" type="Sprite2D" parent="."]
[node name="Sprite2D" type="Sprite2D" parent="."]
texture_filter = 1
scale = Vector2(0.5, 0.5)
texture = ExtResource("2_m3kx1")
[node name="HealthBar" type="ProgressBar" parent="."]
visible = false
top_level = true
offset_right = 150.0
offset_bottom = 27.0
step = 1.0
[node name="Bounds" type="CollisionShape2D" parent="."]
shape = SubResource("CircleShape2D_4poc8")
[node name="Actions" type="Node" parent="."]
[node name="Conditions" type="Node" parent="."]
[connection signal="area_entered" from="." to="." method="OnAreaEntered"]
[connection signal="mouse_entered" from="." to="." method="OnMouseEntered"]
[connection signal="mouse_exited" from="." to="." method="OnMouseExited"]

Binary file not shown.

Before

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

View File

@@ -1,19 +0,0 @@
[remap]
importer="oggvorbisstr"
type="AudioStreamOggVorbis"
uid="uid://ctf7osjgudmv3"
path="res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr"
[deps]
source_file="res://art/House In a Forest Loop.ogg"
dest_files=["res://.godot/imported/House In a Forest Loop.ogg-1a6a72ae843ad792b7039931227e8d50.oggvorbisstr"]
[params]
loop=false
loop_offset=0
bpm=0
beat_count=0
bar_beats=4

BIN
art/arena.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -2,16 +2,16 @@
importer="texture"
type="CompressedTexture2D"
uid="uid://df2xulwx34fi"
path="res://.godot/imported/table.png-2f7ddccae7f21a9c21b1a69f78f7d278.ctex"
uid="uid://nxo2tpgmobli"
path="res://.godot/imported/arena.png-d8e83965b3637c723ffc2bf889822dbe.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/table.png"
dest_files=["res://.godot/imported/table.png-2f7ddccae7f21a9c21b1a69f78f7d278.ctex"]
source_file="res://art/arena.png"
dest_files=["res://.godot/imported/arena.png-d8e83965b3637c723ffc2bf889822dbe.ctex"]
[params]

BIN
art/arenaBounds.png Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

View File

@@ -0,0 +1,34 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://bt5xf5evtlpad"
path="res://.godot/imported/arenaBounds.png-09659382dd1978da5024d88f2bc1f256.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/arenaBounds.png"
dest_files=["res://.godot/imported/arenaBounds.png-09659382dd1978da5024d88f2bc1f256.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 13 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dnoqkj2msjdbe"
path="res://.godot/imported/ball_12.png-ee95853e656d2e219ff7982e8f31245b.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_12.png"
dest_files=["res://.godot/imported/ball_12.png-ee95853e656d2e219ff7982e8f31245b.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://da3nlvk4dbr7k"
path="res://.godot/imported/ball_13.png-d0401eba85428b715e4b7978038050a7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_13.png"
dest_files=["res://.godot/imported/ball_13.png-d0401eba85428b715e4b7978038050a7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dtt144b4hcq1t"
path="res://.godot/imported/ball_14.png-3e724d693d3d782a30a6adc93f2e4b2c.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_14.png"
dest_files=["res://.godot/imported/ball_14.png-3e724d693d3d782a30a6adc93f2e4b2c.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 16 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://3k6u32wysmak"
path="res://.godot/imported/ball_15.png-8cdb4b3900fffa6d5105e2cff3d59cc0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_15.png"
dest_files=["res://.godot/imported/ball_15.png-8cdb4b3900fffa6d5105e2cff3d59cc0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://c6082glgxonen"
path="res://.godot/imported/ball_2.png-5bfcc9971a4473ef19d9aabae57fb14f.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_2.png"
dest_files=["res://.godot/imported/ball_2.png-5bfcc9971a4473ef19d9aabae57fb14f.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://dm08od2rm4t6a"
path="res://.godot/imported/ball_3.png-1f1717ef70ccfa38748c55c3f37bf4f7.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_3.png"
dest_files=["res://.godot/imported/ball_3.png-1f1717ef70ccfa38748c55c3f37bf4f7.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d1xed824duq5b"
path="res://.godot/imported/ball_4.png-b0b95aa2000006a1df4e046cb728e7d0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_4.png"
dest_files=["res://.godot/imported/ball_4.png-b0b95aa2000006a1df4e046cb728e7d0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://cnpkopyuvddgs"
path="res://.godot/imported/ball_5.png-a1e18fd4e8acc177e7dd8288726a71c0.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_5.png"
dest_files=["res://.godot/imported/ball_5.png-a1e18fd4e8acc177e7dd8288726a71c0.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 15 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://d0w8ji224tqo2"
path="res://.godot/imported/ball_6.png-8d292140d73da9ac261c7faa0383e9d6.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_6.png"
dest_files=["res://.godot/imported/ball_6.png-8d292140d73da9ac261c7faa0383e9d6.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Binary file not shown.

Before

Width:  |  Height:  |  Size: 14 KiB

View File

@@ -1,34 +0,0 @@
[remap]
importer="texture"
type="CompressedTexture2D"
uid="uid://b8lfcpntlj5sv"
path="res://.godot/imported/ball_7.png-0fceb32a90a934eda906dd7cb8e82b2d.ctex"
metadata={
"vram_texture": false
}
[deps]
source_file="res://art/ball_7.png"
dest_files=["res://.godot/imported/ball_7.png-0fceb32a90a934eda906dd7cb8e82b2d.ctex"]
[params]
compress/mode=0
compress/high_quality=false
compress/lossy_quality=0.7
compress/hdr_compression=1
compress/normal_map=0
compress/channel_pack=0
mipmaps/generate=false
mipmaps/limit=-1
roughness/mode=0
roughness/src_normal=""
process/fix_alpha_border=true
process/premult_alpha=false
process/normal_map_invert_y=false
process/hdr_as_srgb=false
process/hdr_clamp_exposure=false
process/size_limit=0
detect_3d/compress_to=1

Some files were not shown because too many files have changed in this diff Show More