|
@@ -3,6 +3,7 @@ using System.Collections.Generic;
|
|
|
using UnityEngine;
|
|
using UnityEngine;
|
|
|
using DG.Tweening;
|
|
using DG.Tweening;
|
|
|
using UnityEngine.UI;
|
|
using UnityEngine.UI;
|
|
|
|
|
+using UnityEngine.SceneManagement;
|
|
|
/* 游戏管理者(游戏模式:单人模式、PK模式) */
|
|
/* 游戏管理者(游戏模式:单人模式、PK模式) */
|
|
|
public class GameMgr : MonoBehaviour
|
|
public class GameMgr : MonoBehaviour
|
|
|
{
|
|
{
|
|
@@ -34,6 +35,7 @@ public class GameMgr : MonoBehaviour
|
|
|
this.CheckGuide();
|
|
this.CheckGuide();
|
|
|
}
|
|
}
|
|
|
}
|
|
}
|
|
|
|
|
+ // GameSceneLoadBtns.Create();
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
void Start()
|
|
void Start()
|
|
@@ -175,8 +177,10 @@ public abstract class GameMode
|
|
|
public class GameModeTest : GameMode {
|
|
public class GameModeTest : GameMode {
|
|
|
public GameModeTest(GameMgr gameMgr) : base(gameMgr) {
|
|
public GameModeTest(GameMgr gameMgr) : base(gameMgr) {
|
|
|
//记录可射击的靶子
|
|
//记录可射击的靶子
|
|
|
- TargetBody targetBody = GameObject.Find("GameArea/010/TargetBody").GetComponent<TargetBody>();
|
|
|
|
|
- GameObject.Find("Main Camera/ArmBow").GetComponent<ArmBow>().validTargets.Add(targetBody);
|
|
|
|
|
|
|
+ if (SceneManager.GetActiveScene().name == "Game") {
|
|
|
|
|
+ TargetBody targetBody = GameObject.Find("GameArea/010/TargetBody").GetComponent<TargetBody>();
|
|
|
|
|
+ GameObject.Find("Main Camera/ArmBow").GetComponent<ArmBow>().validTargets.Add(targetBody);
|
|
|
|
|
+ }
|
|
|
}
|
|
}
|
|
|
public override void HitTarget(float score) {
|
|
public override void HitTarget(float score) {
|
|
|
HitTargetNumber.Create(score);
|
|
HitTargetNumber.Create(score);
|