Example #1
0
    public void Attack()
    {
        //Tip:Player Bullet Animation And Attack Animation

        if (Time.time > mDelay)
        {
            GameObject tmp = Instantiate(mBullet.GetBulletObj(), transform.position, transform.rotation) as GameObject;
            tmp.transform.position -= new Vector3(0, 0, 1);
            tmp.transform.Rotate(Vector3.left * 90);
            tmp.transform.parent = this.transform.parent;
            mDelay = Time.time + mInterval;
        }
    }