journal
all all entries rss SoML excited dreams runes YRUU ultimate KTRU skate sleepy nihongo
Rob is 20,356 days old today.
prev day next day printable version

Entries this day: unity-draggable-sprites 日本語を勉強しました

unity draggable sprites

22:55 Thursday 09 April 2015 JST

I just created a version of AH (working title) which allows [dragging sprites](/samples/unity3d/ah/01-draggable-sprites/)

The relevant details: add a Collider (BoxCollider2D in this case), and this script:

    using UnityEngine;
    using System.Collections;
    
    public class Draggable : MonoBehaviour {
    	// The default Position
    	Vector2 startPos;
    
    	// Use this for initialization
    	void Start () {
    		startPos = transform.position;    
    	}
    	
    	void OnMouseDrag() {        
    		// Convert mouse position to world position
    		Vector2 p = Camera.main.ScreenToWorldPoint(Input.mousePosition);
    		
    		// Keep it in a certain radius
    		Vector2 dir = p - startPos;
    
    		// Set the Position
    		transform.position = startPos + dir;
    	}
    
    }
permalink

日本語を勉強しました

10:10 Thursday 09 April 2015 JST

There are probably errors in the Japanese notes below!

memrise

  1. すっかり completely
  2. ちっとも not at all (with negative verb)
  3. はっきり clearly
  4. すると whereupon

anki via textfugu, etc

  1. さとう sugar
permalink
prev day next day