Advertisement
Guest User

LivingShootAction

a guest
Mar 30th, 2017
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.92 KB | None | 0 0
  1. using Game.Logic;
  2. using Game.Logic.Phy.Object;
  3. using System;
  4.  
  5. namespace Game.Logic.Actions
  6. {
  7. public class LivingShootAction : BaseAction
  8. {
  9. private Living m_living;
  10.  
  11. private int m_tx;
  12.  
  13. private int m_ty;
  14.  
  15. private int m_bombId;
  16.  
  17. private int m_force;
  18.  
  19. private int m_angle;
  20.  
  21. private int m_bombCount;
  22.  
  23. private int m_minTime;
  24.  
  25. private int m_maxTime;
  26.  
  27. private float m_Time;
  28.  
  29. public LivingShootAction(Living living, int bombId, int x, int y, int force, int angle, int bombCount, int minTime, int maxTime, float time, int delay) : base(delay, 1000)
  30. {
  31. this.m_living = living;
  32. this.m_bombId = bombId;
  33. this.m_tx = x;
  34. this.m_ty = y;
  35. this.m_force = force;
  36. this.m_angle = angle;
  37. this.m_bombCount = bombCount;
  38. this.m_bombId = bombId;
  39. this.m_minTime = minTime;
  40. this.m_maxTime = maxTime;
  41. this.m_Time = time;
  42. }
  43.  
  44. protected override void ExecuteImp(BaseGame game, long tick)
  45. {
  46. if ((this.m_living is SimpleBoss ? true : this.m_living is SimpleNpc))
  47. {
  48. this.m_living.GetShootForceAndAngle(ref this.m_tx, ref this.m_ty, this.m_bombId, this.m_minTime, this.m_maxTime, this.m_bombCount, this.m_Time, ref this.m_force, ref this.m_angle);
  49. }
  50. if (this.m_living is Player && this.m_minTime == 1001 && this.m_maxTime == 10001)
  51. {
  52. this.m_living.GetShootForceAndAngle(ref this.m_tx, ref this.m_ty, this.m_bombId, this.m_minTime, this.m_maxTime, this.m_bombCount, this.m_Time, ref this.m_force, ref this.m_angle);
  53. }
  54. this.m_living.ShootImp(this.m_bombId, this.m_tx, this.m_ty, this.m_force, this.m_angle, this.m_bombCount, 0);
  55. base.Finish(tick);
  56. }
  57. }
  58. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement