| 123456789101112131415161718 |
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- using UnityEngine.SceneManagement;
- /* 游戏模式-打靶测试 */
- public class GameModeTest : GameMode {
- public GameModeTest(GameMgr gameMgr) : base(gameMgr) {
- //记录可射击的靶子
- if (SceneManager.GetActiveScene().name == "Game") {
- TargetBody targetBody = GameObject.Find("GameArea/TargetObject/TargetBody").GetComponent<TargetBody>();
- GameObject.FindObjectOfType<ArmBow>().validTargets.Add(targetBody);
- targetBody.SetDistance(70);
- }
- }
- public override void HitTarget(float score) {
- HitTargetNumber.Create(score);
- }
- }
|