Browse Source

Merge pull request #123 from shangfengh/new

fix: fix the deficiency of skill
tags/0.1.0
TCL GitHub 3 years ago
parent
commit
1d91f8e83d
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 37 additions and 3 deletions
  1. +2
    -1
      logic/GameClass/GameObj/Character/Character.cs
  2. +4
    -0
      logic/GameClass/Skill/ActiveSkill.cs
  3. +14
    -0
      logic/Gaming/ActionManager.cs
  4. +12
    -0
      logic/Gaming/Game.cs
  5. +4
    -1
      logic/Preparation/Utility/EnumType.cs
  6. +1
    -1
      logic/Preparation/Utility/GameData.cs

+ 2
- 1
logic/GameClass/GameObj/Character/Character.cs View File

@@ -65,7 +65,7 @@ namespace GameClass.GameObj
}
set
{
if (!(value == PlayerStateType.IsMoving || value == PlayerStateType.Null))
if (!(value == PlayerStateType.IsMoving))
lock (gameObjLock)
IsMoving = false;

@@ -477,6 +477,7 @@ namespace GameClass.GameObj
playerState = playerStateType;
CanMove = false;
IsResetting = true;
Position = GameData.PosWhoDie;
}
}



+ 4
- 0
logic/GameClass/Skill/ActiveSkill.cs View File

@@ -214,6 +214,10 @@ namespace GameClass.Skill
{
case BecomeInvisible:
return ActiveSkillType.BecomeInvisible;
case UseKnife:
return ActiveSkillType.UseKnife;
case BeginToCharge:
return ActiveSkillType.BeginToCharge;
default:
return ActiveSkillType.Null;
}


+ 14
- 0
logic/Gaming/ActionManager.cs View File

@@ -22,6 +22,20 @@ namespace Gaming
return true;
}

public bool Stop(Character player)
{
if (player.PlayerState == PlayerStateType.IsRescuing || player.PlayerState == PlayerStateType.IsRescued
|| player.PlayerState == PlayerStateType.IsFixing || player.PlayerState == PlayerStateType.IsMoving
|| player.PlayerState == PlayerStateType.IsTreated || player.PlayerState == PlayerStateType.IsTreating
|| player.PlayerState == PlayerStateType.IsClosingDoor || player.PlayerState == PlayerStateType.IsOpeningDoor
|| player.PlayerState == PlayerStateType.IsClimbingThtoughWindows)
{
player.PlayerState = PlayerStateType.Null;
return true;
}
return false;
}

public bool Fix(Student player)// 自动检查有无发电机可修
{
if (player.PlayerState != PlayerStateType.Null || player.IsGhost())


+ 12
- 0
logic/Gaming/Game.cs View File

@@ -243,6 +243,18 @@ namespace Gaming
}
return false;
}
public bool Stop(long playerID)
{
if (!gameMap.Timer.IsGaming)
return false;
Character player = gameMap.FindPlayer(playerID);
if (player != null)
{
return actionManager.Stop(player);
}
return false;
}

public void Attack(long playerID, double angle)
{
if (!gameMap.Timer.IsGaming)


+ 4
- 1
logic/Preparation/Utility/EnumType.cs View File

@@ -19,6 +19,9 @@ namespace Preparation.Utility
IsRescued = 10,
IsStunned = 11,
IsTryingToAttack = 12,//指前摇
IsOpeningDoor = 13,
IsClosingDoor = 14,
IsClimbingThtoughWindows = 15,
}
public enum GameObjType
{
@@ -79,7 +82,7 @@ namespace Preparation.Utility
NuclearWeapon = 3,
SuperFast = 4,
UseKnife = 5,
ASkill5 = 6
BeginToCharge = 6
}
public enum PassiveSkillType
{


+ 1
- 1
logic/Preparation/Utility/GameData.cs View File

@@ -7,7 +7,7 @@ namespace Preparation.Utility
{
#region 基本常数与常方法
public const int numOfPosGridPerCell = 1000; // 每格的【坐标单位】数
public const int numOfStepPerSecond = 100; // 每秒行走的步数
public const int numOfStepPerSecond = 20; // 每秒行走的步数
public const int frameDuration = 50; // 每帧时长

public const int lengthOfMap = 50000; // 地图长度


Loading…
Cancel
Save