Difference between revisions of "LlGetRegionDayLength/ja"

From Second Life Wiki
Jump to navigation Jump to search
m
m
 
Line 1: Line 1:
{{LSL_Function/ja
{{LSL_Function/ja
|func=llGetRegionDayLength|return_type=integer
|func=llGetRegionDayLength|return_type=integer
|func_desc=Return the number of seconds in the day cycle applied to the current region. [[llGetDayLength]] returns the number of seconds for the current parcel, [[llGetRegionDayLength]] is the number of seconds in the day cycle applied to the entire region.
|func_desc=現在のリージョンに適用される日のサイクルの秒数を返します。[[llGetDayLength]]は現在のパーセルの秒数を返し、[[llGetRegionDayLength]]はリージョン全体に適用される日のサイクルの秒数です。
|examples=
|examples=
<syntaxhighlight lang="lsl2">
<syntaxhighlight lang="lsl2">

Latest revision as of 14:42, 22 November 2023

要約

関数: integer llGetRegionDayLength( );

現在のリージョンに適用される日のサイクルの秒数を返します。llGetDayLengthは現在のパーセルの秒数を返し、llGetRegionDayLengthはリージョン全体に適用される日のサイクルの秒数です。
integer で返します。

サンプル

// print the apparent time of day as HH:MM (%), just like the environment window in the viewer.
// Time of day is a fraction between 0 and 1, 0 is midnight, 0.5 is noon
string printTimeOfDay(float dayFraction) {
    integer hours = (integer)(dayFraction * 24);
    integer minutes = (integer)(dayFraction * 24 * 60) % 60;
    integer percent = (integer)(dayFraction * 100);
    return (string)hours + ":" + llGetSubString((string)(100+minutes), 1, 2) + " (" + (string)percent + "%)";
}

default {
    state_entry() {
        llSetTimerEvent(5);
    }

    timer() {
        float timeOfDay = (llGetUnixTime() + llGetRegionDayOffset()) % llGetRegionDayLength() * 1.0 / llGetRegionDayLength();
        llSetText(printTimeOfDay(timeOfDay), <1,1,0>, 1);
    }
}

特記事項

Search JIRA for related Issues

Signature

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