示例#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;
            }
        }
示例#2
0
 public CrackedCrystal(PowerSource source, int remainingUses) : base(source)
 {
     this.remainingUses = remainingUses;
 }
示例#3
0
 public CrackedCrystal(PowerSource source) : this(source, 100)
 {
 }