Play Journal Entries

Petit computer 3

かいしゅうkaikai.jp

10/27/2017 7:12 AM ·Spoilers

Aとか他のボタン押しながらでもボタン判定検出するのってどうやるんだっけ

Advertisement

Comment

This post has no comments.

  • sin

    10/27/2017 7:26 AM ·Spoilers

    B=button() If b and ボタン定数 then 処理 Endif で他のボタン情報も取得できます

    Yeahs0
  • それやると全く動かなくなるんですよね

    Yeahs0
    Played
  • sin

    10/27/2017 7:38 AM ·Spoilers

    BGの衝突判定(?)をしているようですが、 If b and ボタン定数 and 衝突判定条件 then では無く If(b and ボタン定数)&&衝突判定条件 then とした方が良きです

    Yeahs1
  • 二つ目のANDを&&に変えたら動きました ANDと&&って一緒じゃなかったのか

    Yeahs4
    Played
  • sin

    10/27/2017 7:54 AM ·Spoilers

    Andやorがビット演算子、&&や||が論理演算子だったと思います。 論理演算子は0であるか否かのみを参照します なので 1&&2==1, 2&&1==1, 0&&1==0 となります andは2進数の掛け算と考えていいです 0110 and 1010 は 0110 = 6 **** 1010 = 10 0010 = 2 となります

    Yeahs1
  • 別解 IF B AND 16 THEN を IF (B AND 16)==16 THEN に変える。 ちなみに&&や||は短絡評価と呼ばれる性質があり、ANDやORより高速です。

    Yeahs0
    Played

Add a Comment

You must sign in to post a comment.

Sign in using a Nintendo Network ID to connect to users around the world by writing posts and comments and by giving Yeahs to other people's posts. You can create a Nintendo Network ID using your Wii U console or your system in the Nintendo 3DS family.

Use of Miiverse Details about Miiverse

Report Violation to Miiverse Administrators

You are about to report a post with content which violates the Miiverse Code of Conduct. This report will be sent to Nintendo's Miiverse administrators and not to the creator of the post.

Violation Type:

Post ID: 3DB-NBL7-DPU-2NLB-2L4-PKJ3

Report Violation to Miiverse Administrators

You cannot report posts made automatically by a software title.

Edit Post

Select an action: