diff options
author | chai <chaifix@163.com> | 2022-04-23 13:24:05 +0800 |
---|---|---|
committer | chai <chaifix@163.com> | 2022-04-23 13:24:05 +0800 |
commit | bdb737230b30e8fb9be63d95b792e8c8ba531ea0 (patch) | |
tree | 9e1fe83c65af581d6b3411bcf1b00af4bde8990a /SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs | |
parent | 747a355b8a7d273264ce1d8f1848633f8fa52c47 (diff) |
* ui staff
Diffstat (limited to 'SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs')
-rw-r--r-- | SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs | 38 |
1 files changed, 6 insertions, 32 deletions
diff --git a/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs b/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs index 2a7af2f..033f198 100644 --- a/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs +++ b/SurvivalTest/Assets/Scripts/Test/TestPeaceMaker.cs @@ -3,7 +3,7 @@ using System.Collections.Generic; using UnityEngine; using UnityEngine.Events; -public class TestPeaceMaker : MonoBehaviour +public class TestPeaceMaker : CrewScript { [SerializeField] private Transform m_Camera; @@ -16,8 +16,6 @@ public class TestPeaceMaker : MonoBehaviour [SerializeField] private Vector2 m_Zoom; [SerializeField] private GameObject m_LaunchVfx; [SerializeField] private Transform m_LaunchPoint; - [SerializeField] private TestB2 m_B2; - [SerializeField] private TestSpaceBeam m_SpaceBeam; private Vector3 zoomIn { @@ -56,6 +54,11 @@ public class TestPeaceMaker : MonoBehaviour } private ControlMode m_ControlMode; + private void Awake() + { + PlayerManager.Instance.SetCrew(this); + } + void Start() { m_SpriteRenderer = GetComponent<SpriteRenderer>(); @@ -77,9 +80,6 @@ public class TestPeaceMaker : MonoBehaviour bool isFire = Fire(); bool isGrenade = LaunchGrenade(); - bool isBeam = SpaceBeam(); - - CallB2(); CameraFollow(); @@ -290,30 +290,4 @@ public class TestPeaceMaker : MonoBehaviour } } - void CallB2() - { - if(Input.GetButtonDown("Fire3")) - { - TestB2 b2 = Instantiate<TestB2>(m_B2); - - Vector3 pos3D = m_Coord.GetProjectedPosition(); - b2.Set(pos3D + new Vector3(-15, 0,0 ), pos3D + new Vector3(15, 0,0 ), 20f, 3f); - } - } - - bool SpaceBeam() - { - if (Input.GetButtonDown("SpaceBeam")) - { - TestSpaceBeam beam = Instantiate<TestSpaceBeam>(m_SpaceBeam); - - Vector3 pos3D = m_Coord.position; - beam.Set(pos3D + new Vector3(3, 0, 0)); - - TinyCountDown.Instance.Set("SpaceBeam", 0.1f); - return true; - } - return TinyCountDown.Instance.Get("SpaceBeam") > 0; - } - } |