スコアの加算

Here is the forum to do the questions about how to use to Arbor developer.
Attention point:
  • We can not answer your questions about your project specific issues.
  • We can not answer your questions on Unity's specification issues.
  • Please check Arbor Documentation and ask a question if you still don't know how to use it. If the desired function is not described in the document, it is highly possible that the function does not exist from the beginning, so go to the request forum.

ここは、Arbor開発者へ使い方に関する質問を行うフォーラムです。
注意点:
  • ユーザー様のプロジェクトの仕様上の問題や設計に対する質問には答えられません。
  • Unityの仕様上の問題に対する質問には答えられません。
  • Arbor Documentationを確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。

Forum rules
Here is the forum to do the questions about how to use to Arbor developer.
Attention point:
  • We can not answer your questions about your project specific issues.
  • We can not answer your questions on Unity's specification issues.
  • Please check Arbor Documentation and ask a question if you still don't know how to use it. If the desired function is not described in the document, it is highly possible that the function does not exist from the beginning, so go to the request forum.

ここは、Arbor開発者へ使い方に関する質問を行うフォーラムです。
注意点:
  • ユーザー様のプロジェクトの仕様上の問題や設計に対する質問には答えられません。
  • Unityの仕様上の問題に対する質問には答えられません。
  • Arbor Documentationを確認の上、それでも使い方がわからない場合にご質問ください。欲しい機能の記載がドキュメントにない場合は機能が元から存在しない可能性が高いので要望フォーラムへ。
huraipannn
Posts: 5
Joined: 2015/12/31 20:19

スコアの加算

Post by huraipannn »

お世話になります。お忙しいところ失礼します。
コインプッシャーのtutorialを参考にしていましてプレハブしランダム生成されるEnemyが死んだらスコアが加算されるようにしたいのですが、プレハブした銃弾がCalcParameterのContainerに反応しないみたいです。
どうしたらスコアが加算されるようになるのでしょうか?
0123.png
0123.png (58.81 KiB) Viewed 4129 times
User avatar
caitsithware
管理人
Posts: 493
Joined: 2015/08/17 12:41

Re: スコアの加算

Post by caitsithware »

CalcParameterのContainerプロパティは、基本的にシーンにあらかじめ配置済みのParameterContainerGlobalParameterContainerを指定するようにお願いします。

今回の場合、プレハブから実体化されたEnemyからスコア加算したいということなので、直接CalcParameterは使用できない(プレハブからシーン上のオブジェクトを指定できないのはUnityの仕様)ため、SendTriggerUpwardsなどを使用して親オブジェクトに死んだことを伝えてその親オブジェクトがスコア加算するか、独自のスクリプトを使用して直接スコアを加算してしまうなどをする必要があります。

後者の独自スクリプトによるスコア加算については、2DSTGの敵を作ろうにあるサンプルプロジェクト内のDamageスクリプトおよびScoreスクリプトで確認できます。
huraipannn
Posts: 5
Joined: 2015/12/31 20:19

Re: スコアの加算

Post by huraipannn »

ご連絡ありがとうございます。
アドバイス頂いた方法でやってみようと思います。ご丁寧にありがとうございます。
Post Reply