本文整理汇总了C#中Game.Logic.Phy.Object.Player类的典型用法代码示例。如果您正苦于以下问题:C# Player类的具体用法?C# Player怎么用?C# Player使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Player类属于Game.Logic.Phy.Object命名空间,在下文中一共展示了Player类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C#代码示例。
示例1: Execute
public void Execute(BaseGame game, Player player, ItemTemplateInfo item)
{
switch (item.Property2)
{
case 0:
if (player.IsLiving)
{
player.AddBlood(item.Property3);
}
break;
case 1:
List<Player> temps = player.Game.GetAllFightPlayers();
foreach (Player p in temps)
{
if (p.IsLiving && p.Team == player.Team)
{
p.AddBlood(item.Property3);
}
}
break;
default:
break;
}
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:25,代码来源:AddLifeSpell.cs
示例2: HandleCommand
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet)
{
if (player.HasPaymentTakeCard == false)
{
if (player.PlayerDetail.RemoveMoney(100) > 0&&player.PlayerDetail.RemoveGiftToken(429)>0)
{
int index = packet.ReadByte();
player.CanTakeOut += 1;
player.FinishTakeCard = false;
player.HasPaymentTakeCard = true;
player.PlayerDetail.LogAddMoney(AddMoneyType.Game, AddMoneyType.Game_PaymentTakeCard, player.PlayerDetail.PlayerCharacter.ID, 100, player.PlayerDetail.PlayerCharacter.Money);
if (index < 0 || index > game.Cards.Length)
{
game.TakeCard(player);
}
else
{
game.TakeCard(player, index);
}
}
else
{
player.PlayerDetail.SendInsufficientMoney((int)eBattleRemoveMoneyType.PaymentTakeCard);
}
}
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:27,代码来源:PaymentTakeCardCommand.cs
示例3: HandleCommand
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet)
{
if(game is PVEGame)
{
PVEGame pve = game as PVEGame;
int tryAgain = packet.ReadInt();
bool isHost = packet.ReadBoolean();
if (isHost == true)
{
if (tryAgain == 1)
{
if (player.PlayerDetail.RemoveMoney(100) > 0)
{
//退回关卡结算
pve.WantTryAgain = 1;
game.SendToAll(packet);
player.PlayerDetail.LogAddMoney(AddMoneyType.Game, AddMoneyType.Game_TryAgain, player.PlayerDetail.PlayerCharacter.ID, 100, player.PlayerDetail.PlayerCharacter.Money);
}
else
{
player.PlayerDetail.SendInsufficientMoney((int)eBattleRemoveMoneyType.TryAgain);
}
}
else
{
//退回房间
pve.WantTryAgain = 0;
game.SendToAll(packet);
}
pve.CheckState(0);
}
}
}
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:33,代码来源:TryAgainCommand.cs
示例4: HandleCommand
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet)
{
if (player.IsAttacking)
{
player.Skip(packet.ReadByte());
}
}
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:7,代码来源:SkipNextCommand.cs
示例5: HandleCommand
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet)
{
if (game.GameState != eGameState.Playing || player.GetSealState())
return;
int type = packet.ReadByte();
int place = packet.ReadInt();
int templateID = packet.ReadInt();
ItemTemplateInfo template = ItemMgr.FindItemTemplate(templateID);
if (player.CanUseItem(template))
{
//if (player.CurrentBall.ID == 3 && template.TemplateID == 10003)
// return;
//if (player.PlayerDetail.UsePropItem(game, type, place, templateID, player.IsLiving))
//{
// if (player.UseItem(template) == false)
// {
// BaseGame.log.Error("Using prop error");
// }
//}
if (player.PlayerDetail.UsePropItem(game, type, place, templateID, player.IsLiving))
{
if (player.UseItem(template) == false)
{
BaseGame.log.Error("Using prop error");
}
}
else
{
player.UseItem(template);
}
}
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:35,代码来源:PropUseCommand.cs
示例6: HandleCommand
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet)
{
if (game is PVEGame)
{
PVEGame pve = game as PVEGame;
if (pve.BossCardCount + 1 > 0)
{
int index = packet.ReadByte();
if (index < 0 || index > pve.BossCards.Length)
{
if (pve.IsBossWar != "")
{
pve.TakeBossCard(player);
}
else pve.TakeCard(player);
}
else
{
if (pve.IsBossWar != "")
{
pve.TakeBossCard(player, index);
}
else pve.TakeCard(player, index);
}
}
}
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:27,代码来源:BossTakeCardCommand.cs
示例7: LivingSealAction
public LivingSealAction(Living Living, Player target, int type, int delay)
: base(delay, 2000)
{
m_Living = Living;
m_Target = target;
m_Type = type;
}
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:7,代码来源:LivingSealAction.cs
示例8: HandleCommand
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet)
{
if(player.IsAttacking)
{
player.UseFlySkill();
}
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:7,代码来源:FlyCommand.cs
示例9: OnRemovedFromPlayer
protected override void OnRemovedFromPlayer(Player player)
{
player.PlayerShoot -= new PlayerEventHandle(ChangeProperty);
player.AfterKillingLiving -= new KillLivingEventHanlde(player_AfterKillingLiving);
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:7,代码来源:LockDirectionEquipEffect.cs
示例10: Execute
public void Execute(BaseGame game, Player player, ItemTemplateInfo item)
{
if (player.IsLiving)
{
new SealEffect(item.Property3, 1).Start(player);
}
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:7,代码来源:SealSpell.cs
示例11: MoveToPlayer
public void MoveToPlayer(Player player)
{
int dis = Game.Random.Next(((SimpleNpc)Body).NpcInfo.MoveMin, ((SimpleNpc)Body).NpcInfo.MoveMax);
if (player.X > Body.X)
{
if (Body.X + dis >= player.X)
{
Body.MoveTo(player.X - 10, Body.Y, "walk", 2000, new LivingCallBack(Beat));
}
else
{
Body.MoveTo(Body.X + dis, Body.Y, "walk", 2000, new LivingCallBack(Beat));
}
}
else
{
if (Body.X - dis <= player.X)
{
Body.MoveTo(player.X + 10, Body.Y, "walk", 2000, new LivingCallBack(Beat));
}
else
{
Body.MoveTo(Body.X - dis, Body.Y, "walk", 2000, new LivingCallBack(Beat));
}
}
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:26,代码来源:SimpleBomblingNpc.cs
示例12: RandomShootPlayer
private void RandomShootPlayer()
{
List<Player> players = Game.GetAllLivingPlayers();
int index = Game.Random.Next(0, players.Count);
m_target = players[index];
NpcAttack();
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:7,代码来源:MonstrousHumanoid.cs
示例13: HandleCommand
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet)
{
if (player.IsLiving == false)
{
player.TargetPoint.X = packet.ReadInt();
player.TargetPoint.Y = packet.ReadInt();
}
}
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:8,代码来源:SetGhostTargetCommand.cs
示例14: ChangeProperty
private void ChangeProperty(Player player)
{
if (rand.Next(100) < m_probability)
{
SpellMgr.ExecuteSpell(player.Game, player, ItemMgr.FindItemTemplate(10022));
player.Game.SendEquipEffect(player, LanguageMgr.GetTranslation("AtomBombEquipEffect.Success"));
}
}
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:8,代码来源:AtomBombEquipEffect.cs
示例15: GhostMoveAction
public GhostMoveAction(Player player, Point target)
: base(0, 1000)
{
m_player = player;
m_target = target;
m_v = new Point(target.X - m_player.X, target.Y - m_player.Y);
m_v.Normalize(2);
}
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:8,代码来源:GhostMoveAction.cs
示例16: HandleCommand
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet)
{
if (player.IsAttacking)
{
player.UseSpecialSkill();
player.CurrentShootMinus *= (float)player.CurrentBall.Power;
}
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:9,代码来源:StuntCommand.cs
示例17: playerShot
void playerShot(Player player)
{
IsTrigger = false;
if (rand.Next(100) < m_probability)
{
IsTrigger = true;
player.EffectTrigger = true;
}
}
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:9,代码来源:AddDamageEffect.cs
示例18: ChangeProperty
private void ChangeProperty(Player player)
{
if (rand.Next(100) < m_probability)
{
SpellMgr.ExecuteSpell(player.Game, player, ItemMgr.FindItemTemplate(10015));
// player.Game.SendEquipEffect(player, LanguageMgr.GetTranslation("IceFronzeEquipEffect.Success"));
//player.Game.SendAttackEffect(player, 1);
}
}
开发者ID:geniushuai,项目名称:DDTank-3.0,代码行数:9,代码来源:IceFronzeEquipEffect.cs
示例19: HandleCommand
public void HandleCommand(BaseGame game, Player player, GSPacketIn packet)
{
if (game.GameState != eGameState.Playing || player.GetSealState())
return;
int killID = packet.ReadInt();
//game.SendPetUseKill(player, killID, true);
player.PetUseKill(killID);
}
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:9,代码来源:PetKillCommand.cs
示例20: ChangeProperty
private void ChangeProperty(Player player)
{
if (rand.Next(100) < m_probability)
{
player.Delay = player.DefaultDelay;
player.Game.SendEquipEffect(player, LanguageMgr.GetTranslation("AddTurnEquipEffect.Success"));
//player.Game.SendAttackEffect(player, 1);
}
}
开发者ID:vancourt,项目名称:BaseGunnyII,代码行数:9,代码来源:AddTurnEquipEffect.cs
注:本文中的Game.Logic.Phy.Object.Player类示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论