- コミット日時:
- 2008/11/01 23:26:48 (2 ヶ月前)
- ファイル:
凡例:
- 変更無し
- 追加
- 削除
- 更新
- コピー
- 移動
as2/TeraClock/src/uranodai/utils/TeraClock.as
r1289 r1776 28 28 29 29 if (GMT == undefined) GMT = 9; 30 _gmt = GMT%24; 30 _gmt = GMT % 24; 31 enterFrameListener(); 31 32 mc.onEnterFrame = Delegate.create(this, enterFrameListener); 32 33 } … … 54 55 } 55 56 _preSeconds = _seconds; 57 //trace(this); 56 58 } 57 59 … … 60 62 public function get minutes():Number { return _minutes; } 61 63 public function get seconds():Number { return _seconds; } 64 // 上位1桁返す 65 public function get hoursUpper():Number { return Math.floor(_hours / 10); } 66 public function get minutesUpper():Number { return Math.floor(_minutes / 10); } 67 public function get secondsUpper():Number { return Math.floor(_seconds / 10); } 68 // 下位1桁返す 69 public function get hoursLower():Number { return _hours % 10; } 70 public function get minutesLower():Number { return _minutes % 10; } 71 public function get secondsLower():Number { return _seconds % 10; } 62 72 // 1桁の数の時を2桁にする。返り値は String 型になる。 63 73 public function get hours2():String { return niketa(_hours); } … … 72 82 } 73 83 } 84 85 //アナログ時計にした時の針の角度を返す。 86 public function get hoursDegree():Number { 87 return ((_hours % 12) * 30) + (_minutes / 2) + (_seconds/120); 88 } 89 public function get minutesDegree():Number { 90 return (_minutes * 6) + (_seconds / 10); 91 } 92 public function get secondsDegree():Number { 93 return _seconds * 6; 94 } 74 95 }
