æ¬è¨äºã®ç°å¢
ãæ¬è¨äºã¯ä»¥ä¸ã®ç°å¢ã§éçºãé²ãã¦ããã¾ãã
- éçºOSï¼Windows OSï¼Unityã¯Mac OSã§ãåæ§ã«éçºå¯è½ï¼
- Unityï¼4.6
- éçºè¨èªï¼C#
- IDEï¼Visual Studio 2013 + Visual Studio Tools for Unityï¼æ¨æºã®Mono Developã§ãå¯ï¼
ãOSã«ã¤ãã¦ã¯Windowsãå©ç¨ãã¾ãããMacã§ãåæ§ã«éçºå¯è½ã§ããIDEã«Visual Studioãå©ç¨ãã¾ãããæ¨æºã®MonoDevelopã§ãã³ã¼ãã¯å¤ããã¾ããã
ããµã³ãã«ããã°ã©ã ã¯æ¬è¨äºéå§æï¼ç¬¬9åçµäºç´å¾ï¼ã®ããã¸ã§ã¯ãããproject_010_start.unitypackageããçµäºæç¹ã®ããã¸ã§ã¯ãããproject_010_end.unitypackageãã¨ãªãã¾ãã
è¨äºéå§æç¹ã®ç¶æ ã«ãã
ãæ¬è¨äºã®éå§æç¹ã®ç¶æ ããéçºãéå§ããæ¹æ³ãç´¹ä»ãã¾ãã
project_010_start.unitypackageã®ãã¦ã³ãã¼ã
ãproject_010_start.unitypackageãããã«ã¯ãªãã¯ãããã¨ã§æ¢åã®ããã¸ã§ã¯ãã«project_010_start.unitypackageãèªã¿è¾¼ã¾ãã¾ãã
ãæ°è¦ããã¸ã§ã¯ãã§éå§ããå ´åã¯ãæ°ããããã¸ã§ã¯ããä½æããã®ã¡ãä¸é¨ã¡ãã¥ã¼ã®ãAssetsãâãImport PackageãâãCustom Packageãã§project_010_start.unitypackageãèªã¿è¾¼ãã§ãã ããã
ãIDEã«Visual Studioãå©ç¨ããªãå ´åã¯Importæã«UnityVSã®ãã§ãã¯ãå¤ãã¦ãã ããã
ã以ä¸ã§æ¬è¨äºéå§æã®ç¶æ ã®ããã¸ã§ã¯ããéããã¾ãã
ä»åä½æãããµã³ãã«ãå®è¡ãã
ãä»åä½æããå 容ãå®è¡ããã¨ä»¥ä¸ã®ããã«ãªãã¾ããã³ã¼ããæ¸ãå§ããåã«ã´ã¼ã«ã確èªãã¦ããã¨ç解ãããããªãã¨æãã¾ãã
- ä»åä½æãããã®ã確èªããï¼Unity Playerãã©ã°ã¤ã³ã許å¯ããå¿ è¦ãããã¾ãï¼
GameObjectãã¬ã¤ã¤ã¼ã«åãã
ãååããã ã¹ã¿ã¼ãåºããè½ã¡ãã«æ¹å転æãããããã«éæãªGameObjectãé ç½®ãã¾ããããã ã¹ã¿ã¼ã®åãã¯æå³ããéãã«ãªãã¾ãããããã®ããã«ããã¬ã¤ã¤ã¼ãæä½ãããã£ã©ã¯ã¿ã¼ã¾ã§éæãªGameObjectã«è¡çªãã¦ãã¾ããã¨ããåé¡ãçºçãã¾ããããã®åé¡ã解決ããããã«æå¾ ããåä½ã¯ä»¥ä¸ã§ãã
- ãã ã¹ã¿ã¼ã¯éæãªGameObjectã®å½±é¿ãåãã
- æä½ãã£ã©ã¯ã¿ã¼ã¯éæãªGameObjectã®å½±é¿ãåããªã
ããã®æ¡ä»¶ãå®è£ ããããã«ããã°ã©ã ã³ã¼ããæ¸ãå¿ è¦ã¯ãªããUnity 2Dã®ã¬ã¤ã¤ã¼æ©è½ãå©ç¨ãã¾ãã
ã¬ã¤ã¤ã¼ã®ä½æ
ã¬ã¤ã¤ã¼ã®è¿½å
ãæ°è¦ã«ã¬ã¤ã¤ã¼ãä½æãã¾ããã¬ã¤ã¤ã¼ãå©ç¨ããã¨GameObjectãã°ã«ã¼ãåããã¦ç®¡çãããã¨ãã§ãã¾ãã
ãHierarchyã¦ã£ã³ãã¦ããhamsterãé¸æããInspectorã¦ã£ã³ãã¦ã®Layerãã¯ãªãã¯ãã¾ãã
ãAdd Layerãã¯ãªãã¯ãã¾ãã
ãç»åã®ããã«Layersãå±éããã¦ããªãå ´åã¯ãLayersãã¯ãªãã¯ãã¦å±éãã¾ããUser Layer 8ã¨User Layer 9ã«ä»¥ä¸ã®ããã«Targetã¨TargetHitAreaã¨å ¥åãã¾ãã