Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System.Collections;
- using System.Collections.Generic;
- using UnityEngine;
- public class Player_Carrier : Player
- {
- protected DroneManager d_Manager;
- // Start is called before the first frame update
- void Start()
- {
- d_Manager = base.player.GetComponent<DroneManager>();
- base.Init();
- }
- // Update is called once per frame
- void Update()
- {
- base.Update();
- if (Input.GetMouseButton(1))
- {
- base.AssignPoint();
- //base.Rotate();
- base.isMoving = true;
- }
- else if (Input.GetMouseButton(0))
- {
- base.AssignPoint();
- d_Manager.AssignTarget();
- }
- if (Input.GetKeyDown(KeyCode.T))
- {
- if ((d_Manager.selectedTarget != null)&&(d_Manager.distFromEnemy <= d_Manager.droneRange))
- {
- d_Manager.SpawnInterceptors();
- }
- }
- else if (Input.GetKeyDown(KeyCode.Y))
- {
- d_Manager.RecallInterceptors();
- }
- else if (Input.GetKeyDown(KeyCode.S))
- {
- base.isMoving = false;
- }
- if (d_Manager.distFromEnemy >= d_Manager.droneRange)
- {
- d_Manager.RecallInterceptors();
- Debug.Log("Out of Range");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement