| @@ -23,6 +23,7 @@ v1.6 | |||||
| - 增强为“可以攻击使门被打开(可以重新被锁上)” | - 增强为“可以攻击使门被打开(可以重新被锁上)” | ||||
| - 小炸弹JumpyDumpty | - 小炸弹JumpyDumpty | ||||
| - 小炸弹不受道具增益影响 | - 小炸弹不受道具增益影响 | ||||
| - 修改为“小炸弹与自己无碰撞体积” | |||||
| - strike(新增) | - strike(新增) | ||||
| - 可以攻击未写完的作业 | - 可以攻击未写完的作业 | ||||
| @@ -1,6 +1,5 @@ | |||||
| using Preparation.Interface; | using Preparation.Interface; | ||||
| using Preparation.Utility; | using Preparation.Utility; | ||||
| using System; | |||||
| namespace GameClass.GameObj | namespace GameClass.GameObj | ||||
| { | { | ||||
| @@ -27,7 +26,6 @@ namespace GameClass.GameObj | |||||
| public bool HasSpear => hasSpear; | public bool HasSpear => hasSpear; | ||||
| /// <summary> | /// <summary> | ||||
| /// 与THUAI4不同的一个攻击判定方案,通过这个函数判断爆炸时能否伤害到target | |||||
| /// </summary> | /// </summary> | ||||
| /// <param name="target">被尝试攻击者</param> | /// <param name="target">被尝试攻击者</param> | ||||
| /// <returns>是否可以攻击到</returns> | /// <returns>是否可以攻击到</returns> | ||||
| @@ -36,7 +34,7 @@ namespace GameClass.GameObj | |||||
| public override bool IgnoreCollideExecutor(IGameObj targetObj) | public override bool IgnoreCollideExecutor(IGameObj targetObj) | ||||
| { | { | ||||
| if (targetObj == Parent && CanMove) return true; | |||||
| if (targetObj == Parent) return true; | |||||
| if (targetObj.Type == GameObjType.Prop || targetObj.Type == GameObjType.Bullet) | if (targetObj.Type == GameObjType.Prop || targetObj.Type == GameObjType.Bullet) | ||||
| return true; | return true; | ||||
| return false; | return false; | ||||
| @@ -1,10 +1,5 @@ | |||||
| using Preparation.Interface; | using Preparation.Interface; | ||||
| using Preparation.Utility; | using Preparation.Utility; | ||||
| using System; | |||||
| using System.Collections.Generic; | |||||
| using System.Numerics; | |||||
| using System.Runtime.InteropServices; | |||||
| using System.Threading; | |||||
| namespace GameClass.GameObj | namespace GameClass.GameObj | ||||
| { | { | ||||
| @@ -484,7 +484,7 @@ namespace GameClass.GameObj | |||||
| } | } | ||||
| case (uint)PlaceType.Window: | case (uint)PlaceType.Window: | ||||
| { | { | ||||
| Add(new Window(GameData.GetCellCenterPos(i, j), mapResource[i - 1, j] == (uint)PlaceType.Wall)); | |||||
| Add(new Window(GameData.GetCellCenterPos(i, j))); | |||||
| break; | break; | ||||
| } | } | ||||
| case (uint)PlaceType.BirthPoint1: | case (uint)PlaceType.BirthPoint1: | ||||
| @@ -148,9 +148,11 @@ namespace GameEngine | |||||
| { | { | ||||
| Thread.Sleep(GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond); | Thread.Sleep(GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond); | ||||
| new FrameRateTaskExecutor<int>( | new FrameRateTaskExecutor<int>( | ||||
| () => gameTimer.IsGaming && obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved, | |||||
| () => gameTimer.IsGaming, | |||||
| () => | () => | ||||
| { | { | ||||
| if (obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved) | |||||
| return !(isEnded = true); | |||||
| return !(isEnded = !LoopDo(obj, direction, ref deltaLen, stateNum)); | return !(isEnded = !LoopDo(obj, direction, ref deltaLen, stateNum)); | ||||
| }, | }, | ||||
| GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond, | GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond, | ||||
| @@ -179,8 +181,13 @@ namespace GameEngine | |||||
| if (!isEnded && obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved) | if (!isEnded && obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved) | ||||
| isEnded = !LoopDo(obj, direction, ref deltaLen, stateNum); | isEnded = !LoopDo(obj, direction, ref deltaLen, stateNum); | ||||
| } | } | ||||
| if (!isEnded && obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved) | |||||
| if (isEnded) | |||||
| { | |||||
| obj.IsMoving = false; | |||||
| EndMove(obj); | |||||
| return; | |||||
| } | |||||
| if (obj.StateNum == stateNum && obj.CanMove && !obj.IsRemoved) | |||||
| { | { | ||||
| int leftTime = moveTime % (GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond); | int leftTime = moveTime % (GameData.numOfPosGridPerCell / GameData.numOfStepPerSecond); | ||||
| if (leftTime > 0) | if (leftTime > 0) | ||||