//Overriden public override void Init() { ZIndex = 1; for ( int i = 0; i < 6; i++ ) { Slots[ i ] = new Slot ( new EqualTriangleTool ( game ), 4 ); Slots[ i ].Tool.Init (); float height = Slots[ i ].Tool.Size.Y; float width = Slots[ i ].Tool.Size.X; Slots[ i ].Tool.Position = toolPos - new Vector2 ( width * 4 + PAD + PAD / 2, 10 ) + new Vector2 ( i * ( PAD + width + PAD ), 0 ); } }
/// <summary> /// Initializes a new instance of the <see cref="ToolBox"/> class. /// </summary> /// <param name="game">The game.</param> /// <param name="slots">The slots.</param> public ToolBox( FluxGame game, Slot[] slots ) { this.game = game; this.Slots = slots; this.screenSize = new Vector2 ( game.HUD.Width, game.HUD.Height ); this.toolPos = new Vector2 ( screenSize.X / 2, screenSize.Y - Size.Y / 2 ); this.ActiveBlocks = new List<Block> (); }