Beispiel #1
0
    IEnumerator Shoot()
    {
        while (true)
        {
            currentPin.transform.position = Vector3.MoveTowards(currentPin.transform.position, target, AppConst.Instance().PinShootSpeed *Time.deltaTime);
            yield return(null);

            if (Vector3.Distance(target, currentPin.transform.position) <= 0.1f)
            {
                currentPin.transform.position = target;
                currentPin.transform.SetParent(m_Circle);
                CreatePin();
                break;
            }
        }
    }
Beispiel #2
0
 void Update()
 {
     gameObject.transform.Rotate(new Vector3(0, 0, AppConst.Instance().CircleSpeed *Time.deltaTime));
 }