Esempio n. 1
0
        public Crystal(PowerSource powerSource)
        {
            animationOff = new Animation("resources/crystal_off.png", 28, 32);
            animationOn  = new Animation("resources/crystal_on.png", 28, 32);

            SetAnimation(animationOff);
            animationOff.Start();
            animationOn.Start();

            if (powerSource != null)
            {
                powerSource.Subscribe(this);

                isPowered        = powerSource.IsOn();
                this.powerSource = powerSource;
            }
        }
Esempio n. 2
0
 public CrackedCrystal(PowerSource source, int remainingUses) : base(source)
 {
     this.remainingUses = remainingUses;
 }
Esempio n. 3
0
 public CrackedCrystal(PowerSource source) : this(source, 100)
 {
 }