This part 2 is not so detailed like before, so If you need you can see the part 1 here: http://alxcancado.tumblr.com/post/62482465038/gamedev-tutorial-basic-circle-chain-engine-usingOnce again I want say that this is my port for Unity3D from Emanuele Feronato's tutorial: http://www.emanueleferonato.com/2013/05/21/from-zero-to-a-complete-game-with-cocos2d-html5-step-2-mouse-interaction/ Okay, time to put some mouse interaction.1. add the new textures: red circle, bullet red; configure texture type to advanced, uncheck generate mipmap and filter mode to point.2. drag and drop the greencircleprefab from prefab folder to the hierarchy. drag and drop the red circle texture to this and rename to RedCircle. Remove the GreenCricle script from it. We will create a script to this object later.3. But we still need create our Bullet prefab. To make it simple, just duplicate the RedCircle object from hierarchy panel with Command+D or (Control+D in windows?). Then rename this new object to RedBulletPrefab. Drag n drop the bullet texture to it. We will add a Bullet script later. All done, drag n drop the RedBulletPrefab from Hierarchy to your Prefab folder in your project files, so we create a Prefab of the bullet object. Since we will instantiate bullet objects by code, you can delete the RedBulletPrefab from the Hierarchy panel. 4. Now lets add some player control to RedCircle: go to your script folder and create a new c# script RedCircle; Don't forget to add this script to the RedCircle.using UnityEngine;using System.Collections; public class RedCircle : MonoBehaviour {// for mouse controllerpublic float mousePos;// for 2d position calcpublic Camera cam; // prefab to be instantieatedpublic GameObject redBulletPrefab;public float redBulletXSpeed;public float redBulletYSpeed;public float bulletSpeed = 5; // Use this for initializationvoid Start () {cam = Camera.main.GetComponent<Camera>(); // get the Main Camera instance} // Update is called once per framevoid Update () { attachObjectToMouse (); // if left mouse clicks instantiate our bulletsif (Input.GetMouseButtonDown(0)){ // 4 directions for (int i = 0; i < 4; i++) { // calc the direction of the bulletredBulletXSpeed = bulletSpeed * Mathf.Cos(i * Mathf.PI / 2); //redBullet.xSpeed=bulletSpeed*Math.cos(i*Math.PI/2); redBulletYSpeed = bulletSpeed * Mathf.Sin(i * Mathf.PI / 2); //redBullet.ySpeed=bulletSpeed*Math.sin(i*Math.PI/2); // create a instance of bulletGameObject clone = Instantiate(redBulletPrefab, transform.position, transform.rotation) as GameObject;clone.SendMessage("setBulletXSpeed", redBulletXSpeed);clone.SendMessage("setBulletYSpeed", redBulletYSpeed); } }} private void attachObjectToMouse () {Vector3 screenPos = Input.mousePosition; // need convert 2d position (from mouse) to 3d world positionVector3 worldPos = new Vector3(cam.ScreenToWorldPoint(screenPos).x, cam.ScreenToWorldPoint(screenPos).y, cam.ScreenToWorldPoint(screenPos).z); // set the red circle object positiongameObject.transform.position = worldPos; } }5. Now you can movement the Red Circle with mouse! But we still need create a script to control the bullets and then add this script to our RedBulletPrefab prefab:using UnityEngine;using System.Collections; public class Bullet : MonoBehaviour {// objects pooling: http://channel9.msdn.com/Events/Windows-Camp/Building-Windows-Games-with-Unity/Deep-dive-Tips-tricks-for-porting-games-from-other-platforms-to-Windows-8 // bullet public float redBulletXSpeed;public float redBulletYSpeed; // for 2d position calcpublic Camera cam;public float screenX; // = Camera.current.ScreenToWorldPoint( new Vector3 (Screen.width, 0, 0)).x;public float screenY; // = Camera.current.ScreenToWorldPoint( new Vector3 (0, Screen.height, 0)).y; // Use this for initializationvoid Start () {cam = Camera.main.GetComponent<Camera>(); // get the Main Camera instance} // Update is called once per framevoid Update () {transform.Translate( new Vector3(redBulletXSpeed, redBulletYSpeed, 0 ) * Time.deltaTime);//transform.Translate( new Vector3(0f, ySpeed*Time.deltaTime, 0f) ); // get screen limitsgetCurrentMaxWorldScreen(); // destroy bullets if off screendeleteOffScreenObject();} // get