Subversion Repositories SoapBoxCore

Rev

Rev 8 | Rev 13 | Go to most recent revision | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
8 scott 1
#region "SoapBox.Demo License"
2
/// <header module="SoapBox.Demo"> 
3
/// Copyright (C) 2009 SoapBox Automation Inc., All Rights Reserved.
4
/// Contact: SoapBox Automation Licencing (license@soapboxautomation.com)
5
/// 
6
/// This file is part of SoapBox Demo.
7
/// 
8
/// GNU Lesser General Public License Usage
9
/// SoapBox Demo is free software: you can redistribute it and/or modify 
10
/// it under the terms of the GNU Lesser General Public License
11
/// as published by the Free Software Foundation, either version 3 of the
12
/// License, or (at your option) any later version.
13
/// 
14
/// SoapBox Demo is distributed in the hope that it will be useful, 
15
/// but WITHOUT ANY WARRANTY; without even the implied warranty of
16
/// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17
/// GNU Lesser General Public License for more details.
18
/// 
19
/// You should have received a copy of the GNU Lesser General Public License 
20
/// along with SoapBox Demo. If not, see <http://www.gnu.org/licenses/>.
21
/// </header>
22
#endregion
23
 
24
using System;
25
using System.Collections.Generic;
26
using System.Linq;
27
using System.Text;
28
using SoapBox.Core.Arena;
29
using System.Windows;
30
using SoapBox.Core;
31
 
32
namespace SoapBox.Demo.PinBall
33
{
34
    public class PinBallLevelDisplay : AbstractArenaDecorationBody
35
    {
36
        public const float WIDTH = 200f;
37
        public const float HEIGHT = 110f;
38
 
12 scott 39
        public PinBallLevelDisplay(PinBallTable table, Point startingPoint)
8 scott 40
        {
41
            InitialX = (float)startingPoint.X;
42
            InitialY = (float)startingPoint.Y;
43
 
44
            Sprite = new PinBallLevelDisplaySprite();
45
        }
46
 
47
        public void SetLevel(int level)
48
        {
49
            PinBallLevelDisplaySprite s = Sprite as PinBallLevelDisplaySprite;
50
            if (s != null)
51
            {
52
                if (level > s.Level)
53
                {
54
                    SoundManager.PlayWav(Resources.Sounds.driiinng2);
55
                }
56
                s.Level = level;
57
            }
58
        }
59
   }
60
}