private void AtaqueEspecial2Flip(Xbox360GamePad control) { if (CurrentState == VariableState.FlipParado) { if (control.ButtonDown(Xbox360GamePad.Button.DPadUp) && control.ButtonPushed(Xbox360GamePad.Button.Y)) { this.CurrentState = VariableState.FlipEspecial2; } } if (CurrentState == VariableState.FlipEspecial2 && this.Sprite.CurrentFrameIndex == 2) { //for (int i = 0; i > 3; i++) // { Precios precio = new Precios(ContentManagerName); precio.setPosicion(this.X - 2 , this.Y + 100, this.EnemigoX, this.Y); this.ListaAtaques.Add(precio); // precio.Destroy(); //} } if (CurrentState == VariableState.FlipEspecial2 && this.Sprite.CurrentFrameIndex == 3) { CurrentState = VariableState.FlipParado; } }
private void CambiarOrden(Xbox360GamePad control) { if(control.ButtonPushed(Xbox360GamePad.Button.LeftShoulder)) { this.sensorial.Orden1(); this.PhysDamage = this.PhysDamage * 1.2f; orden2 = false; } else if (control.ButtonPushed(Xbox360GamePad.Button.RightShoulder)) { this.sensorial.Orden2(); this.PhysDamage = auxiliar; orden2 = true; } if (orden2) { if (ListaAtaques.Count > 0) { foreach (Especial i in ListaAtaques) { i.setDamage(20); } } } }
private void AtaqueEspecial1Flip(Xbox360GamePad control) { if (CurrentState == VariableState.FlipParado) { if (control.ButtonDown(Xbox360GamePad.Button.DPadUp) && control.ButtonPushed(Xbox360GamePad.Button.X)) { //proyectil.Destroy(); this.CurrentState = VariableState.FlipEspecial1; } } if (CurrentState == VariableState.FlipEspecial1 && this.Sprite.CurrentFrameIndex == 2) { Proyectil proyectil = new Proyectil(ContentManagerName); proyectil.setPosicion(this.X - 50, this.Y, this.EnemigoX); proyectil.setTipo(this.Estado); this.ListaAtaques.Add(proyectil); } if (CurrentState == VariableState.FlipEspecial1 && this.Sprite.CurrentFrameIndex == 3) { CurrentState = VariableState.FlipParado; } }
private void AtaqueEspecial2Flip(Xbox360GamePad control) { if (CurrentState == VariableState.FlipParado) { if (control.ButtonPushed(Xbox360GamePad.Button.LeftShoulder)) { this.CurrentState = VariableState.FlipEspecial2; if (this.Estado == "Natural") { this.Estado = "Bajo"; } else if (this.Estado == "Alto") { this.Estado = "Natural"; } this.interes.setTipo(this.Estado); } else if (control.ButtonPushed(Xbox360GamePad.Button.RightShoulder)) { this.CurrentState = VariableState.FlipEspecial2; if (this.Estado == "Natural") { this.Estado = "Alto"; } else if (this.Estado == "Bajo") { this.Estado = "Natural"; } this.interes.setTipo(this.Estado); } } if (CurrentState == VariableState.FlipEspecial2 && this.Sprite.CurrentFrameIndex == 1) { CurrentState = VariableState.FlipParado; } }
private void AtaqueEspecial2Flip(Xbox360GamePad control) { if (CurrentState == VariableState.FlipParado) { if (control.ButtonDown(Xbox360GamePad.Button.DPadUp) && control.ButtonPushed(Xbox360GamePad.Button.Y)) { this.CurrentState = VariableState.FlipEspecial2; } } if (CurrentState == VariableState.FlipEspecial2 && this.Sprite.CurrentFrameIndex == 0) { Fisto malnutrido = new Fisto(ContentManagerName); malnutrido.setPosicion(this.X-70, this.Y+200, this.EnemigoX); ListaAtaques.Add(malnutrido); //malnutrido.Destroy(); } if (CurrentState == VariableState.FlipEspecial2 && this.Sprite.CurrentFrameIndex == 1) { CurrentState = VariableState.FlipParado; } }
private void AtaqueEspecial1Flip(Xbox360GamePad control) { if (CurrentState == VariableState.FlipParado) { if (control.ButtonDown(Xbox360GamePad.Button.DPadUp) && control.ButtonPushed(Xbox360GamePad.Button.X)) { this.CurrentState = VariableState.FlipEspecial1; } } if (CurrentState == VariableState.FlipEspecial1 && this.Sprite.CurrentFrameIndex == 0) { Fist1 feto = new Fist1(ContentManagerName); feto.setPosicion(this.X - 30, this.Y + 2, this.EnemigoX); ListaAtaques.Add(feto); //feto.Destroy(); } if (CurrentState == VariableState.FlipEspecial1 && this.Sprite.CurrentFrameIndex == 1) { CurrentState = VariableState.FlipParado; } }
private void AtaqueEspecial2(Xbox360GamePad control) { if (CurrentState == VariableState.Parado) { if (control.ButtonDown(Xbox360GamePad.Button.DPadUp) && control.ButtonPushed(Xbox360GamePad.Button.Y)) { this.CurrentState = VariableState.Especial2; } } if (CurrentState == VariableState.Especial2 && this.Sprite.CurrentFrameIndex == 2) { Malnutrido malnutrido = new Malnutrido(ContentManagerName); malnutrido.setPosicion(this.X, this.Y, this.EnemigoX); ListaAtaques.Add(malnutrido); //malnutrido.Destroy(); poblacion.UpdateFillFlip(); } if (CurrentState == VariableState.Especial2 && this.Sprite.CurrentFrameIndex == 3) { CurrentState = VariableState.Parado; } }
private void AtaqueEspecial1(Xbox360GamePad control) { if (CurrentState == VariableState.Parado) { if (control.ButtonDown(Xbox360GamePad.Button.DPadUp) && control.ButtonPushed(Xbox360GamePad.Button.X)) { this.CurrentState = VariableState.Especial1; Fetoyectil feto = new Fetoyectil(ContentManagerName); //feto.X = this.X; //feto.Y = this.Y; feto.setPosicion(this.X + 3,this.Y + 2, this.EnemigoX); ListaAtaques.Add(feto); //feto.Destroy(); poblacion.UpdateFillFlip(); } } if (CurrentState == VariableState.Especial1 && this.Sprite.CurrentFrameIndex == 1) { //Fetoyectil feto = new Fetoyectil(ContentManagerName); // feto.setPosicion(400/*this.X + 3*/, -120/*this.Y + 2*/, this.EnemigoX); //ListaAtaques.Add(feto); //feto.Destroy(); // poblacion.UpdateFillFlip(); } }