ヘルプ日本語訳/Understanding the events

Last-modified: 2010-12-23 (木) 15:32:12

ヘルプ日本語訳 > Understanding the events

 

イベント、条件、アクション、そして関数を理解する。

Multimedia Fusion 2 Developer製アプリケーションに追加できるすべての要素には、オブジェクトの型があります。それぞれのオブジェクトにはいくつかのイベント条件アクション関数が割り当てられています。
イベントはMultimedia Fusion 2 Developer製アプリケーションの基礎になります。各イベントは、一つ以上の条件、アクション、(場合によっては)関数から構成され、イベントエディタで定義します。各イベントは設定した条件が満たされるまで待ち、条件が満たされたとき割り当てられたアクションを実行します。

 

条件はアクションを引き起こすための、アプリケーション内で行う検査です。すべてのアクションはMultimedia Fusion 2 Developerの条件検出に依存し、条件が満たされたとき、その条件に割り当てられたアクションが実行されます。衝突、動作、表示/非表示は条件の典型です。たとえば、オブジェクト同士の衝突、オブジェクトがバウンス、ユーザーがマウスをクリック などはすべて条件で、これらはアクションを引き起こすことができます。
アクションはアプリケーション内で条件が満たされた時に引き起こされます。
特定の条件が満たされたら、その条件に割り当てられたアクションが実行されます。動作、表示/非表示、別のフレームに移動 はアクションの典型です。例えば、オブジェクトを停止、非表示にする、アプリケーションの最後のフレームに移動する などを条件の結果として実行できます。

 

オブジェクトのイベント、条件、アクションの関係の例として、「宇宙船と隕石が衝突した結果、宇宙船が破壊される」という事柄を挙げます。条件は「宇宙船と隕石が衝突」でアクションは「宇宙船の破壊」です。条件とアクションの組み合わせから構成されるものがイベントです。
関数を使うとオブジェクトからデータ取得でき、別のオブジェクトに使わせたり、アクションで利用したりできます。例えば、プレイヤー3のライフの数をスコアオブジェクトに残したい場合、プレイヤーオブジェクトの関数「現在のライフの数」を使ってライフオブジェクトのライフの数*1を取得し、スコアオブジェクトに表示*2できます。

 

(原文)Understanding events, conditions, actions, and functions

Every element that you add to your Multimedia Fusion 2 Developer applications is a type of object. Each object can have any number of events, conditions, actions, and functions associated with it.
Events are the foundation of your Multimedia Fusion 2 Developer applications. Each event consists of one or more conditions, actions, and sometimes functions that you define in the Event Editor. Each event waits for a specific condition to occur in your application and then executes the associated actions.

 

Conditions are tests within your applications that trigger actions. All actions depend upon Multimedia Fusion 2 Developer detecting a condition and then executing the actions associated with it. Collisions, movement, and visibility are all examples of conditions. For example, two objects colliding, an object beginning to bounce, or the user clicking the mouse are all conditions that can trigger an action.
Actions are triggered when a condition becomes true in an application. Once a particular condition is detected, the associated action(s) take place. Movement, visibility, and jumping to a new frame are all examples of actions. For example, an object can stop moving, become invisible, or jump to the last frame in the application as a result of a condition.

 

An example of the interaction between an object’s events, conditions, and actions is a collision between a spaceship and a meteorite resulting in the destruction of the spaceship. The event is the combination of the condition (the collision between the spaceship and the meteorite), and the action (the destruction of the spaceship).
Functions let you retrieve data from one object for use by another object or for use in an action. For example, if you want to display the number of lives that Player 3 has left in the Score object, you can use the Player object function Current number of lives to retrieve the number of lives in the Lives object for display in the Score object.


*1 ライフオブジェクト自体はライフの数を持っていません。
*2 スコアオブジェクト自体に表示を変更するアクションはありません。スコアを変更するにはプレイヤーオブジェクトを使用してください。