コード例 #1
0
    void PrepAStar()
    {
        //mCurStar
        if (mStars.Count > 0)
        {
            mCurStar = mStars.Dequeue();
            mCurStar.transform.parent        = grabber.headAttach;
            mCurStar.transform.localPosition = Vector3.zero;
            mCurStar.transform.localScale    = Vector3.one;

            mCurStar.glowSprite.gameObject.active = true;

            if (isReadyToFire)
            {
                mCurStar.WeaponPrep();
            }
            else
            {
                mCurStar.WeaponRefresh();
            }

            if (mStars.Count < braids.Length)
            {
                braids[mStars.Count].gameObject.SetActiveRecursively(false);
            }
        }
        else
        {
            mCurStar = null;
        }
    }
コード例 #2
0
 protected override void OnReadyToFire()
 {
     if (mCurStar != null)
     {
         mCurStar.WeaponPrep();
     }
 }
コード例 #3
0
ファイル: WeaponStar.cs プロジェクト: ddionisio/GitGirl
    void PrepAStar()
    {
        //mCurStar
        if(mStars.Count > 0) {
            mCurStar = mStars.Dequeue();
            mCurStar.transform.parent = grabber.headAttach;
            mCurStar.transform.localPosition = Vector3.zero;
            mCurStar.transform.localScale = Vector3.one;

            mCurStar.glowSprite.gameObject.active = true;

            if(isReadyToFire) {
                mCurStar.WeaponPrep();
            }
            else {
                mCurStar.WeaponRefresh();
            }

            if(mStars.Count < braids.Length) {
                braids[mStars.Count].gameObject.SetActiveRecursively(false);
            }
        }
        else {
            mCurStar = null;
        }
    }