Written by Paul Graham and copied from http://www.paulgraham.com/ideas.html
October 2005
(This essay is derived from a talk at the 2005 Startup School.)
using UnityEngine; | |
using System.Collections; | |
public class ScrollingBackground : MonoBehaviour { | |
// Here's what this script does, step by step: | |
// Duplicates the object | |
// Scrolls both at a given scrollSpeed | |
// When an object's full length has been scrolled, it is placed on the duplicate's original position | |
// Last step is repeated for both objects indefinitely |
{ | |
"atomic_save": true, | |
"color_scheme": "Packages/Material Theme/schemes/Material-Theme.tmTheme", | |
"font_size": 10, | |
"ignored_packages": | |
[ | |
"Vintage" | |
], | |
"spacegray_tabs_xlarge": true, | |
"theme": "Material-Theme.sublime-theme", |
module.exports = { | |
"parser": "@typescript-eslint/parser", | |
"parserOptions": { | |
"project": "./tsconfig.json" | |
}, | |
"extends": [ | |
"eslint:recommended", | |
"airbnb-base", | |
"plugin:eslint-comments/recommended", | |
"plugin:promise/recommended", |
Written by Paul Graham and copied from http://www.paulgraham.com/ideas.html
October 2005
(This essay is derived from a talk at the 2005 Startup School.)
Why procrastinators procrastinate
Inside our minds there is a rational decision maker, who is a good planner and cares about our future. The rational decision maker knows what needs to be done to maximize happiness in the long term and make us be successful in our dreams and aspirations.
The instant gratification monkey also lives in the mind. It often goes against the rational decision maker, especially in the mind of an avid procrastinator. His favorite activity is to find the easiest, lowest stakes activity it can to help maximize pleasure in the present moment.
Sometimes a third character appears in the mind: the panic monster. Typically accompanied by a looming deadline or the threat of social disgrace, the panic monster drives the procrastinator to jump into action and sprint through the task at hand.
It's not good for a procrastinator to rely on the panic monster:
using System.Linq; | |
using UnityEngine; | |
[RequireComponent(typeof(MeshFilter))] | |
public class Jellify : MonoBehaviour { | |
[SerializeField] | |
[Tooltip("The object's resistance to outside forces. Default value is 10.")] | |
[Range(1f, 1000f)] | |
private float stiffness = 10f; |
// Based on script found at http://wiki.unity3d.com/index.php/Floating_Origin | |
// on 2021-05-13, modified substantially - mostly to accomodate multiplayer, | |
// by introducing threshold and offset values. | |
using UnityEngine; | |
public class FloatingOrigin : MonoBehaviour { | |
public static FloatingOrigin Instance; | |
// Largest value allowed for the main camera's X or Z coordinate before that |
using System; | |
using System.Threading; | |
using System.Threading.Tasks; | |
using UnityEngine; | |
namespace UnityUtilities | |
{ | |
/// <summary> | |
/// A replacement for `Task.Run()` that cancels tasks when entering or | |
/// exiting play mode in the Unity editor (which doesn't happen by default). |
using System; | |
using System.Text; | |
using UnityEngine; | |
/// <summary> | |
/// An implementation of the Fowler–Noll–Vo 1a hash | |
/// https://en.wikipedia.org/wiki/Fowler%E2%80%93Noll%E2%80%93Vo_hash_function#FNV-1a_hash | |
/// http://www.isthe.com/chongo/tech/comp/fnv/index.html | |
/// </summary> | |
namespace MarcosPereira.Terrain { |