Skip to content

Instantly share code, notes, and snippets.

View scriptsengineer's full-sized avatar
🔨
Building a sentry

Rafael Correa scriptsengineer

🔨
Building a sentry
View GitHub Profile
@scriptsengineer
scriptsengineer / pixel_perfect.gd
Created April 18, 2022 17:36 — forked from CowThing/pixel_perfect.gd
Pixel perfect scaling script for Godot 3.1
extends Node
"""
An autoload singleton for pixel perfect rendering of the game.
Set this script as an autoload.
`base_size` - Is the target size of the viewport. The viewport will scale up to fit the largest
possible integer multiple of this size within the window.
`expand` - If true the viewport will expand to the edges of the window after scaling up.
@scriptsengineer
scriptsengineer / SHorizontalLayoutGroup.cs
Created November 28, 2021 15:26 — forked from codorizzi/HorizontalOrVerticalLayoutGroupEditor.cs
Unity - Smooth Layout Group (using DoTween)
using UnityEngine;
namespace GameAssets.Scripts.Utility.SLayout
{
[AddComponentMenu("Layout/SHorizontal Layout Group", 150)]
public class SHorizontalLayoutGroup : SHorizontalOrVerticalLayoutGroup
{
protected SHorizontalLayoutGroup()
{}
@scriptsengineer
scriptsengineer / UDPSocket.cs
Created September 7, 2019 03:47 — forked from darkguy2008/UDPSocket.cs
Simple C# UDP server/client in 56 lines
using System;
using System.Net;
using System.Net.Sockets;
using System.Text;
namespace UDP
{
public class UDPSocket
{
private Socket _socket = new Socket(AddressFamily.InterNetwork, SocketType.Dgram, ProtocolType.Udp);