Exemplo n.º 1
0
        public static int GetMotionSetIndex(
            IList <Bar.Entry> barEntries, MotionName motionId, bool isBattle, bool hasWeapon)
        {
            const int MaxMotionCountPerAnim = 4;
            var       ModeTable             = new byte[]
            {
                0x00, 0x01, 0x03, 0x02, 0x01, 0x00, 0x02, 0x03,
                0x02, 0x03, 0x01, 0x00, 0x03, 0x02, 0x00, 0x01
            };

            var modeIndex = isBattle == false ? 2 : 1;

            if (hasWeapon)
            {
                modeIndex ^= 1;
            }

            for (var i = 0; i < MaxMotionCountPerAnim; i++)
            {
                var msetId = ModeTable[modeIndex * 4 + i] + (int)motionId * 4;
                //if (msetId == 0)
                //    continue;
                if (ContainsAnimation(barEntries[msetId]))
                {
                    return(msetId);
                }
            }

            return(-1);
        }
Exemplo n.º 2
0
    // 初期化
    public override void Init()
    {
        base.Init();

        _currentMotion = MotionName.NUTORAL;
        _key           = 0;
        _cntTime       = 0;

        _cntLaserTime        = _laserStartDelay;
        _cntShot             = 0;
        _cntShot_End         = 0;
        _currentShotPosition = 0;
        _state = State.REST;
    }
Exemplo n.º 3
0
 /// <summary>
 /// 使用モーションとそれに合わせた描画アセットの指定
 /// </summary>
 /// <param name="motionName">モーション名</param>
 private void setMotionAndAsset(MotionName motionName)
 {
     currentMotion   = motionDict[motionName];
     motionAssetWord = motionName.ToString();
 }