- JavaScript 的基礎
- HTML + CSS 的基礎
- 前提:用終端機來控制電腦~ (英文關鍵字:
terminal
,command prompt
) - 如何在 Windows 上面打開 terminal?
using UnityEngine; | |
using System.Linq; | |
using System.Collections.Generic; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
[InitializeOnLoad] |
using System.Collections; | |
using System.Collections.Generic; | |
using UnityEngine; | |
public class Voxelizer : MonoBehaviour { | |
public int xSlices = 5; | |
public int ySlices = 5; | |
public int zSlices = 5; | |
public GameObject Cube; |
/** | |
* Spawns a wall along the X and Y axes of the WallSpawner, using cubes of given size and materials | |
*/ | |
using UnityEngine; | |
using System.Collections; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif |
/** | |
* Spawns a stack of bricks | |
*/ | |
using UnityEngine; | |
using System.Collections; | |
#if UNITY_EDITOR | |
using UnityEditor; | |
#endif |
package mouseclicks; | |
import java.awt.Robot; | |
import java.awt.event.InputEvent; | |
import java.awt.event.KeyEvent; | |
public class RobotMouseTest { | |
static Robot bot; | |
public static void main(String[] args) throws Exception { | |
Thread.sleep(50); |
using UnityEngine; | |
using System.Collections; | |
/// <summary> | |
/// For this to work, you need a background sprite that is | |
/// 1) cyclical: it's left side connects seam-less with it's right side | |
/// 2) it must at least span the width of the camera view | |
/// 3) it must be repeated twice (so you actually have the same thing three times, implying at least three times the camera view width) | |
/// | |
/// TODO: To make things simpler, you can just mirror a single sprite/texture and repeat it three times |
--[[ | |
Steps: | |
1. Download heightmap Bitmap | |
e.g. from terrain.party: http://terrain.party/api/export?name=guarda&box=10.186055,46.850130,10.080975,46.778264) | |
e.g. from earthe | |
Data Sets: NASA LPDAAC Collections -> NASA SRTM (SRTM 3) Collections | |
2. Use this site to convert BMP to Lua: https://codepen.io/Domiii/pen/oMJvoJ?editors=0010 | |
3. Copy the final Lua code to workspace.TerrainPixels (ModuleScript) | |
4. Run this script! |
--[[ | |
Steps: | |
1. Use an editor to create a pixel map (e.g. https://www.piskelapp.com/) | |
1b. If your editor cannot export BMP files, use an online converter to generate a BMP file (e.g. https://image.online-convert.com/convert-to-bmp) | |
2. Convert BMP to Lua here: https://codepen.io/Domiii/pen/oMJvoJ?editors=0010 | |
3. Copy the final Lua code to workspace.LevelPixels (ModuleScript) | |
4. Fix configuration below: make sure that colors map to blocks that have been prepared | |
5. Run this script! |
terminal
, command prompt
)