Ejemplo n.º 1
0
 void Update()
 {
     if (Input.GetMouseButtonDown(0))
     {
         FishingNetControl.Create(Input.mousePosition, m_Trans.position);
     }
 }
Ejemplo n.º 2
0
    public static FishingNetControl Create(Vector3 pMouse, Vector3 pZ)
    {
        GameObject tFishingNet = Resources.Load <GameObject> ("yuwang");

        tFishingNet = Instantiate(tFishingNet);
        tFishingNet.transform.localScale       = Vector3.one * 2;
        tFishingNet.transform.localEulerAngles = new Vector3(-90f, 0, -180f);
        tFishingNet.name = "yuwang";
        FishingNetControl tCtrl = tFishingNet.GetComponent <FishingNetControl> ();

        tCtrl.netAnimation = tFishingNet.GetComponentInChildren <Animation>();
        tCtrl.Init(pMouse, pZ);
        GameData.Instance.reduceCoin(30);
        return(tCtrl);
    }