Ejemplo n.º 1
0
 public virtual void Update(Player p, float dt)
 {
     Duration -= dt;
     if (Duration <= 0) {
         p.RemoveEffect(this);
     }
 }
Ejemplo n.º 2
0
 public void OnUse(Player player)
 {
     if (Cooldown <= 0) {
         if (move != null && move.OnUse != null) {
             move.OnUse(player);
         }
     }
 }
Ejemplo n.º 3
0
 public void Uninitialize()
 {
     Arena = null;
     Player1.Unload();
     Player2.Unload();
     Player1 = null;
     Player2 = null;
     Camera.Disable();
 }
Ejemplo n.º 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);
        }
Ejemplo n.º 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;
        }
Ejemplo n.º 6
0
 public void TakeSpecialDamage(float Amount, Player other)
 {
     this.HP -= Amount * (other.SpecialAttack / this.SpecialDefense);
 }
Ejemplo n.º 7
0
 public void TakeDamage(float Amount, Player other)
 {
     this.HP -= Amount * (other.Attack / this.Defense);
 }
Ejemplo n.º 8
0
 public abstract void Uninitialize(Player p);
Ejemplo n.º 9
0
 public StatusEffect(Player Owner, float Duration)
 {
     this.Owner = Owner;
     this.Duration = Duration;
 }