示例#1
0
 public virtual void Update(Player p, float dt)
 {
     Duration -= dt;
     if (Duration <= 0) {
         p.RemoveEffect(this);
     }
 }
示例#2
0
 public void OnUse(Player player)
 {
     if (Cooldown <= 0) {
         if (move != null && move.OnUse != null) {
             move.OnUse(player);
         }
     }
 }
示例#3
0
 public void Uninitialize()
 {
     Arena = null;
     Player1.Unload();
     Player2.Unload();
     Player1 = null;
     Player2 = null;
     Camera.Disable();
 }
示例#4
0
        public FloatingCamera(Player Player1, Player Player2)
        {
            this.Player1 = Player1;
            this.Player2 = Player2;

            GraphicsManager.Update += GraphicsManager_Update;
            Camera = new Camera2D();
            Camera.OnRender += new GraphicsManager.Renderer(Camera_OnRender);
        }
示例#5
0
        public void Initialize()
        {
            if (LoadableBattleArena.Arenas.Count > 0)
            {
                Arena = LoadableBattleArena.Arenas[0];
                Arena.Bind();
            }
            else
            {
                Arena = new Forrest();
            }

            Player1 = new Player(Arena, Controls.Player1, -1, PlayerOne);
            Player2 = new Player(Arena, Controls.Player2, -2, PlayerTwo);

            Player1.SetPosition(-5, 3);
            Player2.SetPosition(5, 3);
            Player1.Direction = 1;

            Camera = new FloatingCamera(Player1, Player2);

            DeadTimer = 0.0f;
        }
示例#6
0
 public void TakeSpecialDamage(float Amount, Player other)
 {
     this.HP -= Amount * (other.SpecialAttack / this.SpecialDefense);
 }
示例#7
0
 public void TakeDamage(float Amount, Player other)
 {
     this.HP -= Amount * (other.Attack / this.Defense);
 }
示例#8
0
 public abstract void Uninitialize(Player p);
示例#9
0
 public StatusEffect(Player Owner, float Duration)
 {
     this.Owner = Owner;
     this.Duration = Duration;
 }