Beispiel #1
0
    /// <summary>
    /// 生成子彈
    /// </summary>
    /// <returns></returns>
    private IEnumerator CreateBullet()
    {
        yield return(new WaitForSeconds(data.nearAttackDelay + 0.7f));

        Vector3 pos = transform.position + new Vector3(0, data.nearAttackPos.y, 0);

        pos += transform.forward * data.nearAttackPos.z;

        GameObject temp = Instantiate(bullet, pos, transform.rotation);

        temp.GetComponent <Rigidbody>().AddForce(transform.forward * data.FarPower);

        Buttle buttle = temp.AddComponent <Buttle>();

        buttle.damage       = data.attack;
        buttle.playerBuller = false;
    }
Beispiel #2
0
    public bool IsVertical; //该眼泪是否是垂直眼泪

    void Awake()
    {
        instance = this;
        ani      = transform.GetComponent <Animator> ( );
    }