Inheritance: MonoBehaviour
Ejemplo n.º 1
0
 private void Awake()
 {
     lr          = GetComponent <LineRenderer>();
     grappleGun  = GetComponent <GrappleGun>();
     gunRotation = GetComponent <GunRotation>();
     gun         = GetComponent <Gun>();
 }
Ejemplo n.º 2
0
        /// <summary>
        /// Delete the grapple hook.
        /// </summary>
        public void Delete()
        {
            try
            {
                //if (Rope == null)
                //{
                //    return;
                //}

                //if (Character != null)
                //{
                //    Rope.DetachEntity(Character);
                //}

                if (Hook != null)
                {
                    //Rope.DetachEntity(Hook);

                    Hook.Delete();
                }

                if (GrappleGun != null)
                {
                    GrappleGun.Delete();
                }

                //Rope.Delete();
            }
            catch
            {
                // ignored
            }
        }
Ejemplo n.º 3
0
 // Use this for initialization
 void Start()
 {
     Cursor.lockState = CursorLockMode.Locked;
     character        = GetComponent <Rigidbody>();
     mouseLook        = GetComponent <CustomMouseLook>();
     rotator          = GetComponent <CharacterRotator>();
     sMovement        = GetComponent <SurfaceMovement>();
     grappleGun       = GetComponent <GrappleGun>();
     if (grappleGun)
     {
         grappleGun.controller = this;
     }
     grappled  = false;
     justFired = false;
 }
Ejemplo n.º 4
0
    // private GameObject hookedPrefab;

    void Awake()
    {//must change everything to an array
        MainGunScript = guns[0].GetComponent <GrappleGun>();
        AIgun1Script  = guns[1].GetComponent <AIGun>();
        AIgun2Script  = guns[2].GetComponent <AIGun>();
        AIgun3Script  = guns[3].GetComponent <AIGun>();
        AIgun4Script  = guns[4].GetComponent <AIGun>();
        AIgun5Script  = guns[5].GetComponent <AIGun>();



        _isHooked    = false;
        isAIDropping = false;
        maxTime      = UnityEngine.Random.Range(4, 6);

        if (thisCube == null)
        {
            thisCube = transform;
        }

        spawnLocation = thisCube.transform.position;

        Respawn();
    }
Ejemplo n.º 5
0
 // Use this for initialization
 void Start()
 {
     Cursor.lockState = CursorLockMode.Locked;
     character = GetComponent<Rigidbody>();
     mouseLook = GetComponent<CustomMouseLook>();
     rotator = GetComponent<CharacterRotator>();
     sMovement = GetComponent<SurfaceMovement>();
     grappleGun = GetComponent<GrappleGun>();
     if (grappleGun) grappleGun.controller = this;
     grappled = false;
     justFired = false;
 }