Создание стратегии
This commit is contained in:
parent
62ef6652a4
commit
07ceaa0852
2
ProjectFighterJet/FormFighterJet.Designer.cs
generated
2
ProjectFighterJet/FormFighterJet.Designer.cs
generated
@ -48,7 +48,7 @@
|
||||
pictureBoxFighterJet.Size = new Size(800, 435);
|
||||
pictureBoxFighterJet.TabIndex = 0;
|
||||
pictureBoxFighterJet.TabStop = false;
|
||||
pictureBoxFighterJet.Click += pictureBoxFighterJet_Click;
|
||||
pictureBoxFighterJet.Click += ButtonMove_Click;
|
||||
//
|
||||
// buttonCreate
|
||||
//
|
||||
|
@ -117,13 +117,6 @@ namespace ProjectFighterJet
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
private void pictureBoxFighterJet_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
|
||||
private void buttonStrategyStep_Click(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
@ -144,7 +137,7 @@ namespace ProjectFighterJet
|
||||
{
|
||||
return;
|
||||
}
|
||||
_strategy.SetData(new MoveableStormtrooper(_drawningJet), pictureBoxFighterJet.Width, pictureBoxFighterJet.Height);
|
||||
_strategy.SetData(new MoveableJet(_drawningJet), pictureBoxFighterJet.Width, pictureBoxFighterJet.Height);
|
||||
}
|
||||
|
||||
if (_strategy == null)
|
||||
@ -162,7 +155,4 @@ namespace ProjectFighterJet
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
}
|
@ -7,11 +7,11 @@ using System.Threading.Tasks;
|
||||
|
||||
namespace ProjectFighterJet.MovementStrategy;
|
||||
|
||||
public class MoveableStormtrooper : IMoveableObject
|
||||
public class MoveableJet : IMoveableObject
|
||||
{
|
||||
private DrawningJet? _drawningjet;
|
||||
|
||||
public MoveableStormtrooper(DrawningJet drawningjet)
|
||||
public MoveableJet(DrawningJet drawningjet)
|
||||
{
|
||||
_drawningjet = drawningjet;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user