This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Drawing a line with UITK https://forum.unity.com/threads/drawing-a-line-with-uitk.1193470/ | |
public class LineDrawer : VisualElement | |
{ | |
private Vector3 startPos, endPos; | |
private float thickness; | |
public LineDrawer(Vector3 pos1, Vector3 pos2, float width) | |
{ | |
startPos = pos1; | |
endPos = pos2; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using Entitas; | |
using UnityEngine; | |
public class TimerSystem : IExecuteSystem, ICleanupSystem | |
{ | |
readonly IGroup<GameEntity> _timers; | |
readonly IGroup<GameEntity> _timerCompletes; | |
readonly GameContext _context; | |
public TimerSystem(Contexts contexts) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export {} | |
declare global { | |
interface Date { | |
addDays(days: number, useThis?: boolean): Date; | |
isToday(): boolean; | |
clone(): Date; | |
isAnotherMonth(date: Date): boolean; | |
isWeekend(): boolean; | |
isSameDate(date: Date): boolean; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using UnityEditor; | |
using UnityEngine; | |
using System; | |
using System.Collections.Generic; | |
using System.IO; | |
using System.Text.RegularExpressions; | |
// Object rendering code based on Dave Carlile's "Create a GameObject Image Using Render Textures" post | |
// Link: http://crappycoding.com/2014/12/create-gameobject-image-using-render-textures/ |