Difference between revisions of "LlGetTimeOfDay/ja"

From Second Life Wiki
Jump to navigation Jump to search
m (Undo revision 851052 by Mako Nozaki (Talk))
 
(One intermediate revision by one other user not shown)
Line 4: Line 4:
|func_sleep=0.0
|func_sleep=0.0
|func_energy=10.0
|func_energy=10.0
|return_type=float
|func_footnote=Second Life のデイサイクルは 4 時間です (3 時間が日中、1 時間が夜) 。日の出と日没時間は (季節にしたがって?) 微妙に変更していきます。
|func_footnote
|func_desc=Second Life の深夜または地域の起動時間 (地域がオンライン/再起動されたとき) からの sub-second 精度の秒単位での経過時間を float で返します。地域が設定変更され太陽が同じ位置にある場合、返る時間は地域の起動時間となります。
|func_desc
|return_text=Second Lifeサーバの深夜(あるいはサーバのアップタイムの、いずれかの早いほう)からの秒単位での時間
|spec
|spec
|caveats
|caveats
|constants
|constants
|examples
|examples=<source lang="lsl2">//太陽が固定されていない限り、時間は 4 時間未満となります。
default
{
    touch_start(integer total_number)
    {
        float tod = llGetTimeOfDay( );
        llOwnerSay("Time since last region restart or SL midnight (based on SL 4 hour day):");
        integer hours = ((integer)tod / 3600) ;
        integer minutes = ((integer)tod / 60) - (hours * 60);
        llOwnerSay((string) tod + " seconds which is "+(string) hours+"h "+(string) minutes+"m");
    }
}</source>
|helpers
|helpers
|also_functions=
|also_functions=

Latest revision as of 14:47, 25 February 2016

要約

関数: llGetTimeOfDay( );

Second Life の深夜または地域の起動時間 (地域がオンライン/再起動されたとき) からの sub-second 精度の秒単位での経過時間を float で返します。地域が設定変更され太陽が同じ位置にある場合、返る時間は地域の起動時間となります。

Second Life のデイサイクルは 4 時間です (3 時間が日中、1 時間が夜) 。日の出と日没時間は (季節にしたがって?) 微妙に変更していきます。

サンプル

//太陽が固定されていない限り、時間は 4 時間未満となります。
default
{
    touch_start(integer total_number)
    {
        float tod = llGetTimeOfDay( );
        llOwnerSay("Time since last region restart or SL midnight (based on SL 4 hour day):");
        integer hours = ((integer)tod / 3600) ;
        integer minutes = ((integer)tod / 60) - (hours * 60);
        llOwnerSay((string) tod + " seconds which is "+(string) hours+"h "+(string) minutes+"m"); 
    }
}

関連項目

関数

•  llGetSunDirection

特記事項

Search JIRA for related Issues

Signature

function void llGetTimeOfDay();
この翻訳は 原文 と比べて古いですか?間違いがありますか?読みにくいですか?みんなで 修正 していきましょう! (手順はこちら)
この項目はあなたにとって参考にならない項目ですか?もしかしたらLSL Wikiの関連した項目が参考になるかもしれません。