Source/Bit.m
changeset 11 436cbdf56810
parent 10 6c78cc6bd7a6
child 12 4e567e11f45f
     1.1 --- a/Source/Bit.m	Thu Jul 03 17:44:30 2008 -0700
     1.2 +++ b/Source/Bit.m	Sat Jul 05 17:46:43 2008 -0700
     1.3 @@ -100,18 +100,24 @@
     1.4  - (void) setPickedUp: (BOOL)up
     1.5  {
     1.6      if( up != _pickedUp ) {
     1.7 -        CGFloat shadow, offset, radius, opacity, z, scale;
     1.8 +        CGFloat shadow, radius, opacity, z, scale;
     1.9 +        CGSize offset;
    1.10          if( up ) {
    1.11              shadow = 0.8;
    1.12 -            offset = 2;
    1.13 +            offset = CGSizeMake(2,2);
    1.14              radius = 8;
    1.15              opacity = kPickedUpOpacity;
    1.16              scale = kPickedUpScale;
    1.17              z = kPickedUpZ;
    1.18              _restingZ = self.zPosition;
    1.19 +            _restingShadowOpacity = self.shadowOpacity;
    1.20 +            _restingShadowOffset  = self.shadowOffset;
    1.21 +            _restingShadowRadius  = self.shadowRadius;
    1.22          } else {
    1.23 -            shadow = offset = radius = 0.0;
    1.24 -            opacity = 1.0;
    1.25 +            shadow = _restingShadowOpacity;
    1.26 +            offset = _restingShadowOffset;
    1.27 +            radius = _restingShadowRadius;
    1.28 +            opacity = 1;
    1.29              scale = 1.0/kPickedUpScale;
    1.30              z = _restingZ;
    1.31          }
    1.32 @@ -119,7 +125,7 @@
    1.33          //self.zPosition = z;
    1.34  #if !TARGET_OS_IPHONE
    1.35          self.shadowOpacity = shadow;
    1.36 -        self.shadowOffset = CGSizeMake(offset,-offset);
    1.37 +        self.shadowOffset = offset;
    1.38          self.shadowRadius = radius;
    1.39  #endif
    1.40          self.opacity = opacity;