- o = [xo = 0, yo = 0] is the origin
- A = [xA, yA] is a point on the 2D plane. Same for B, C, ...
- lengths are in any unit (ex: pixels)
- code snippets are in JavaScript
angleRad = angleDeg * Math.PI / 180;
// The MIT License (MIT) | |
// Copyright (c) 2016 David Evans @phosphoer | |
// Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: | |
// The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software. | |
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR |
// Unity C# Cheat Sheet | |
// I made these examples for students with prior exerience working with C# and Unity. | |
// Too much? Try Unity's very good tutorials to get up to speed: https://unity3d.com/learn/tutorials/topics/scripting |
using UnityEngine; | |
using UnityEngine.UI; | |
/* | |
Radial Layout Group by Just a Pixel (Danny Goodayle) - http://www.justapixel.co.uk | |
Copyright (c) 2015 | |
Permission is hereby granted, free of charge, to any person obtaining a copy | |
of this software and associated documentation files (the "Software"), to deal | |
in the Software without restriction, including without limitation the rights | |
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
using UnityEngine; | |
using UnityEngine.UI; | |
using System.Collections; | |
using UnityEngine.SceneManagement; | |
public class ScreenFader : MonoBehaviour | |
{ | |
public Image FadeImg; | |
public float fadeSpeed = 1.5f; | |
public bool sceneStarting = true; |
using UnityEngine; | |
using System.Collections; | |
public class LaserScript : MonoBehaviour | |
{ | |
[Header("Laser pieces")] | |
public GameObject laserStart; | |
public GameObject laserMiddle; | |
public GameObject laserEnd; |
// LoadingScreenManager | |
// -------------------------------- | |
// built by Martin Nerurkar (http://www.martin.nerurkar.de) | |
// for Nowhere Prophet (http://www.noprophet.com) | |
// | |
// Licensed under GNU General Public License v3.0 | |
// http://www.gnu.org/licenses/gpl-3.0.txt | |
using UnityEngine; | |
using UnityEngine.UI; |
This is a compilation of various open-source Unity plugins, codebases, or utility scripts that may aid in expediting the development process.
"ProbePolisher is a Unity Editor plugin for editing light probes. It works both on Unity Basic (free) and Unity Pro."
#include <stdio.h> | |
int main() | |
{ | |
int month[2], day[2], year[2], i, t, age; | |
scanf("%d", &t); | |
for (i = 1; i <= t; ++i) | |
{ |
package notepad; | |
import javax.swing.*; | |
import java.awt.*; | |
import java.awt.event.*; | |
import java.util.Scanner; | |
import java.io.*; | |
public class Notepad extends JFrame implements ActionListener { | |
private TextArea textArea = new TextArea("", 0,0, TextArea.SCROLLBARS_VERTICAL_ONLY); |