示例#1
0
    // Use this for initialization
    void Start()
    {
        if (aeroplaneController == null)
        {
            aeroplaneController = gameObject.GetComponent <AeroplaneController>();
        }
        if (userControl == null)
        {
            userControl = gameObject.GetComponent <AeroplaneUserControl>();
        }
        if (fogLayer == null)
        {
            fogLayer = gameObject.GetComponentInChildren <paragliderFogLayer>();
        }

        GameObject ndp = new GameObject();

        ndp.name                = "next finish docking point";
        nextDockingPoint        = ndp.transform;
        nextDockingPoint.parent = transform.parent;
        if (rigi == null)
        {
            rigi = GetComponent <Rigidbody>();
        }
    }
示例#2
0
 void Start()
 {
     aircraft = GetComponent <AeroplaneController>();
     initPos  = transform.position;
     initRot  = transform.rotation;
     Restart();
 }
    void Awake()
    {
        // Set up the reference to the aeroplane controller.
        plane = GetComponent <AeroplaneController>();

        // Add the audiosources and get the references.
        engineSoundSource = gameObject.AddComponent <AudioSource>();
        windSoundSource   = gameObject.AddComponent <AudioSource>();

        // Assign clips to the audiosources.
        engineSoundSource.clip = engineSound;
        windSoundSource.clip   = windSound;

        // Set the parameters of the audiosources.
        engineSoundSource.minDistance  = advanced.engineMinDistance;
        engineSoundSource.maxDistance  = advanced.engineMaxDistance;
        engineSoundSource.loop         = true;
        engineSoundSource.dopplerLevel = advanced.engineDopplerLevel;

        windSoundSource.minDistance  = advanced.windMinDistance;
        windSoundSource.maxDistance  = advanced.windMaxDistance;
        windSoundSource.loop         = true;
        windSoundSource.dopplerLevel = advanced.windDopplerLevel;

        // Start the sounds playing.
        engineSoundSource.Play();
        windSoundSource.Play();
    }
 void Start()
 {
     m_Rigidbody  = GetComponent <Rigidbody>();
     m_Controller = GetComponent <AeroplaneController>();
     m_NavAgent   = GetComponent <PathFindingAgent>();
     _startingPos = transform.position;
 }
	void Awake ()
	{
        // Set up the reference to the aeroplane controller.
		plane = GetComponent<AeroplaneController>();	
		
		// Add the audiosources and get the references.
		engineSoundSource = gameObject.AddComponent<AudioSource>();
		windSoundSource = gameObject.AddComponent<AudioSource>();
		
		// Assign clips to the audiosources.
		engineSoundSource.clip = engineSound;
		windSoundSource.clip = windSound;
		
		// Set the parameters of the audiosources.
		engineSoundSource.minDistance = advanced.engineMinDistance;
		engineSoundSource.maxDistance = advanced.engineMaxDistance;
		engineSoundSource.loop = true;
		engineSoundSource.dopplerLevel = advanced.engineDopplerLevel;
		
		windSoundSource.minDistance = advanced.windMinDistance;
		windSoundSource.maxDistance = advanced.windMaxDistance;
		windSoundSource.loop = true;
		windSoundSource.dopplerLevel = advanced.windDopplerLevel;
		
        // Start the sounds playing.
		engineSoundSource.Play();
		windSoundSource.Play();	
	}
示例#6
0
 private void Start()
 {
     this.jet = this.FindAeroplaneParent();
     this.system = base.GetComponent<ParticleSystem>();
     this.originalLifetime = this.system.startLifetime;
     this.originalStartSize = this.system.startSize;
     this.originalStartColor = this.system.startColor;
 }
示例#7
0
 private void Start()
 {
     this.jet                = this.FindAeroplaneParent();
     this.system             = base.GetComponent <ParticleSystem>();
     this.originalLifetime   = this.system.startLifetime;
     this.originalStartSize  = this.system.startSize;
     this.originalStartColor = this.system.startColor;
 }
	private bool takenOff;                               		// Has the plane taken off yet


    // setup script properties
	void Awake ()
	{
		// get the reference to the aeroplane controller, so we can send move input to it and read its current state.
		aeroplaneController = GetComponent<AeroplaneController>();

		// pick a random perlin starting point for lateral wandering
	    randomPerlin = Random.Range (0f, 100f);
	}
        // setup script properties
        private void Awake()
        {
            // get the reference to the aeroplane controller, so we can send move input to it and read its current state.
            m_AeroplaneController = GetComponent <AeroplaneController>();

            // pick a random perlin starting point for lateral wandering
            m_RandomPerlin = 0f;
        }
    private const float RpmToDps   = 60f;                                    // For converting from revs per minute to degrees per second.


    void Awake()
    {
        // Set up the reference to the aeroplane controller.
        plane = GetComponent <AeroplaneController>();

        // Set the propellor blur gameobject's parent to be the propellor.
        propellorBlur.parent = propellorModel;
    }
    private const float RpmToDps = 60f;             // For converting from revs per minute to degrees per second.
	

	void Awake ()
    {
        // Set up the reference to the aeroplane controller.
		plane = GetComponent<AeroplaneController>();

        // Set the propellor blur gameobject's parent to be the propellor.
		propellorBlur.parent = propellorModel;
	}
示例#12
0
    // Use this for initialization
    void Start()
    {
        airCraft  = GameObject.Find("AircraftJet");
        planeInfo = airCraft.GetComponent <AeroplaneController>();
        rigid     = GetComponent <Rigidbody>();

        //Init(8, 3, 0); //Debug用
        //Music.Play("Melt");
    }
示例#13
0
    // Use this for initialization
    void Start()
    {
        pool  = GameObject.FindGameObjectWithTag("BulletPool").GetComponent <ObjectPooling>();
        audio = GetComponent <AudioSource>();
        aeroplaneController = GetComponent <AeroplaneController> ();
        isFiringBullets     = false;

        currentHealth = fullHealth;
        _renderers    = GetComponentsInChildren <Renderer>();
    }
示例#14
0
 /// <summary>
 /// 
 /// </summary>
 void Awake()
 {
     view = PhotonView.Get(this);
     JetController = GetComponent<AeroplaneController>();
     GController = FindObjectOfType<bl_GameController>();
     if (!view.ObservedComponents.Contains(this))
     {
         view.ObservedComponents.Add(this);
     }
 }
示例#15
0
 private void Start()
 {
     this.plane = base.GetComponent <AeroplaneController>();
     AeroplaneControlSurfaceAnimator.ControlSurface[] array = this.controlSurfaces;
     for (int i = 0; i < array.Length; i++)
     {
         AeroplaneControlSurfaceAnimator.ControlSurface controlSurface = array[i];
         controlSurface.originalLocalRotation = controlSurface.transform.localRotation;
     }
 }
示例#16
0
 /// <summary>
 ///
 /// </summary>
 void Awake()
 {
     view          = PhotonView.Get(this);
     JetController = GetComponent <AeroplaneController>();
     GController   = FindObjectOfType <bl_GameController>();
     if (!view.ObservedComponents.Contains(this))
     {
         view.ObservedComponents.Add(this);
     }
 }
    // Use this for initialization
    void Start()
    {
        CarController = GetComponent <CarController>();
        CarUser       = GetComponent <CarUserControl>();
        CarAudio      = GetComponent <CarAudio>();
        VehicleMass   = GetComponent <Rigidbody>();

        AircraftController = GetComponent <AeroplaneController>();
        AircraftUser       = GetComponent <AeroplaneUserControl4Axis>();
        AircraftAudio      = GetComponent <AeroplaneAudio>();
    }
    private AeroplaneController plane;                              // Reference to the aeroplane controller.

    void Start()
    {
        // Get the reference to the aeroplane controller.
        plane = GetComponent<AeroplaneController>();

        // Store the original local rotation of each surface, so we can rotate relative to this
        foreach (var surface in controlSurfaces)
        {
            surface.originalLocalRotation = surface.transform.localRotation;
        }
    }
示例#19
0
    // Use this for initialization
    void Start()
    {
        aircraftController = aircraft.GetComponent <AeroplaneController>();

        normalFieldOfView = mainCamera.fieldOfView;

        normalMaxEnginePower = aircraftController.MaxEnginePower;

        bodyNomalMaterial  = aircraftBody.GetComponentInChildren <MeshRenderer>().material;
        wingsNomalMaterial = aircraftWings.GetComponentInChildren <MeshRenderer>().material;
    }
    private AeroplaneController plane;                              // Reference to the aeroplane controller.

    void Start()
    {
        // Get the reference to the aeroplane controller.
        plane = GetComponent <AeroplaneController>();

        // Store the original local rotation of each surface, so we can rotate relative to this
        foreach (var surface in controlSurfaces)
        {
            surface.originalLocalRotation = surface.transform.localRotation;
        }
    }
示例#21
0
    private Color originalStartColor;                   // The original starting colout of the particle system

    // Use this for initialization
    void Start()
    {
        // get the aeroplane from the object hierarchy
        jet = FindAeroplaneParent();

        // get the particle system ( it will be on the object as we have a require component set up
        system = GetComponent <ParticleSystem>();

        // set the original properties from the particle system
        originalLifetime   = system.startLifetime;
        originalStartSize  = system.startSize;
        originalStartColor = system.startColor;
    }
	private Color originalStartColor;                   // The original starting colout of the particle system

    // Use this for initialization
	void Start () {

        // get the aeroplane from the object hierarchy
		jet = FindAeroplaneParent();

        // get the particle system ( it will be on the object as we have a require component set up
		system = GetComponent<ParticleSystem>();

        // set the original properties from the particle system
		originalLifetime = system.startLifetime;
		originalStartSize = system.startSize;
		originalStartColor = system.startColor;
	}
示例#23
0
 private void Awake()
 {
     aeroplaneController = GetComponent <AeroplaneController>();
     if (variableWing != null)
     {
         skinnedMeshRenderer[0] = variableWing.GetComponent <SkinnedMeshRenderer>();
         skinnedMesh[0]         = skinnedMeshRenderer[0].sharedMesh;
     }
     if (tailPlane != null)
     {
         skinnedMeshRenderer[1] = tailPlane.GetComponent <SkinnedMeshRenderer>();
         skinnedMesh[1]         = skinnedMeshRenderer[1].sharedMesh;
     }
 }
示例#24
0
    private AeroplaneController FindAeroplaneParent()
    {
        Transform transform = base.transform;

        while (transform != null)
        {
            AeroplaneController component = transform.GetComponent <AeroplaneController>();
            if (!(component == null))
            {
                return(component);
            }
            transform = transform.parent;
        }
        throw new Exception(" AeroplaneContoller not found in object hierarchy");
    }
示例#25
0
 private void Awake()
 {
     this.plane = base.GetComponent<AeroplaneController>();
     this.engineSoundSource = base.gameObject.AddComponent<AudioSource>();
     this.windSoundSource = base.gameObject.AddComponent<AudioSource>();
     this.engineSoundSource.clip = this.engineSound;
     this.windSoundSource.clip = this.windSound;
     this.engineSoundSource.minDistance = this.advanced.engineMinDistance;
     this.engineSoundSource.maxDistance = this.advanced.engineMaxDistance;
     this.engineSoundSource.loop = true;
     this.engineSoundSource.dopplerLevel = this.advanced.engineDopplerLevel;
     this.windSoundSource.minDistance = this.advanced.windMinDistance;
     this.windSoundSource.maxDistance = this.advanced.windMaxDistance;
     this.windSoundSource.loop = true;
     this.windSoundSource.dopplerLevel = this.advanced.windDopplerLevel;
     this.engineSoundSource.Play();
     this.windSoundSource.Play();
 }
 /// <summary>
 ///
 /// </summary>
 void Awake()
 {
     view      = PhotonView.Get(this);
     VehicleUI = FindObjectOfType <bl_VehicleUI>();
     if (m_VehicleType == VehicleType.Car)
     {
         CarScript = GetComponent <CarController>();
     }
     else if (m_VehicleType == VehicleType.Jet)
     {
         JetScript  = GetComponent <AeroplaneController>();
         m_Animator = GetComponent <Animator>();
     }
     if (!view.ObservedComponents.Contains(this))
     {
         view.ObservedComponents.Add(this);
     }
 }
示例#27
0
 private void Awake()
 {
     this.plane                          = base.GetComponent <AeroplaneController>();
     this.engineSoundSource              = base.gameObject.AddComponent <AudioSource>();
     this.windSoundSource                = base.gameObject.AddComponent <AudioSource>();
     this.engineSoundSource.clip         = this.engineSound;
     this.windSoundSource.clip           = this.windSound;
     this.engineSoundSource.minDistance  = this.advanced.engineMinDistance;
     this.engineSoundSource.maxDistance  = this.advanced.engineMaxDistance;
     this.engineSoundSource.loop         = true;
     this.engineSoundSource.dopplerLevel = this.advanced.engineDopplerLevel;
     this.windSoundSource.minDistance    = this.advanced.windMinDistance;
     this.windSoundSource.maxDistance    = this.advanced.windMaxDistance;
     this.windSoundSource.loop           = true;
     this.windSoundSource.dopplerLevel   = this.advanced.windDopplerLevel;
     this.engineSoundSource.Play();
     this.windSoundSource.Play();
 }
示例#28
0
    void Start()
    {
        stats = PlayerStats.instance;

        stats.curHealth = stats.maxHealth;

        _base = GameObject.FindGameObjectWithTag("Base");



        m_Plane = GetComponent <AeroplaneController> ();

        InvokeRepeating("RegenHealth", 1f / stats.healthRegenRate, 1f / stats.healthRegenRate);


        if (statusIndicator != null)
        {
            statusIndicator.SetHealth(stats.curHealth, stats.maxHealth);
        }
        damageUI.GetComponent <Image>().enabled = false;

        GameMaster.gm.onToggleUpgradeMenu += onUpgradeMenuToggle;
    }
    // Use this for initialization
    void Start()
    {
        // Set up the reference to the aeroplane controller.
        m_Aeroplane = GetComponent <AeroplaneController>();

        /* Initialize a PXCMSenseManager instance */
        sm = PXCMSenseManager.CreateInstance();
        if (sm != null)
        {
            /* Enable hand tracking and configure the hand module */
            pxcmStatus sts = sm.EnableHand();
            if (sts == pxcmStatus.PXCM_STATUS_NO_ERROR)
            {
                /*init hand data structure*/
                handData = new PXCMHandData.IHand[2];

                /* Hand module interface instance */
                hand = sm.QueryHand();
                /* Hand data interface instance */
                hand_data = hand.CreateOutput();

                // Create hand configuration instance and configure
                hcfg = hand.CreateActiveConfiguration();
                hcfg.EnableAllAlerts();
                hcfg.SubscribeAlert(OnFiredAlert);
                hcfg.EnableNormalizedJoints(true);
                hcfg.ApplyChanges();
                hcfg.Dispose();

                /* Initialize the execution pipeline */
                if (sm.Init() != pxcmStatus.PXCM_STATUS_NO_ERROR)
                {
                    OnDisable();
                }
            }
        }
    }
示例#30
0
 private void Awake()
 {
     this.aeroplaneController = base.GetComponent<AeroplaneController>();
     this.randomPerlin = UnityEngine.Random.Range(0f, 100f);
 }
 private void Awake()
 {
     this.plane = base.GetComponent<AeroplaneController>();
     this.propellorBlur.parent = this.propellorModel;
 }
示例#32
0
 private void Awake()
 {
     // Set up the reference to the aeroplane controller.
     m_Aeroplane = GetComponent<AeroplaneController>();
 }
示例#33
0
 private void Awake()
 {
     this.aeroplane = base.GetComponent <AeroplaneController>();
 }
示例#34
0
 // Use this for initialization
 void Start()
 {
     plane    = GetComponent <AeroplaneController>();
     animator = GetComponent <Animator>();
 }
示例#35
0
 private void Awake()
 {
     controller = GetComponent <AeroplaneController>();
 }
示例#36
0
 void Start()
 {
     ac = GetComponent <AeroplaneController>();
 }
示例#37
0
 private void Start()
 {
     this.plane    = base.GetComponent <AeroplaneController>();
     this.animator = base.GetComponent <Animator>();
 }
示例#38
0
	// Use this for initialization
	void Start () {
		plane = GetComponent<AeroplaneController>();
		animator = GetComponent<Animator>();
	}
 private void Awake()
 {
     isStarted   = false;
     m_Aeroplane = GetComponent <AeroplaneController>();
 }
示例#40
0
 // Use this for initialization
 void Start()
 {
     flightScript       = GameObject.FindGameObjectWithTag("AircraftJet").GetComponent <AeroplaneController> ();
     initPos            = transform.localPosition;
     movementMultiplier = -0.003333333f;
 }
示例#41
0
 // Use this for initialization
 void Start()
 {
     aeroPlaneController = airPlane.GetComponent <AeroplaneController>();
     motionBlur          = camera.GetComponent <MotionBlur>();
     speedupsound        = speedUp.GetComponent <AudioSource>();
 }
 private void Awake()
 {
     // Set up the reference to the airplane controller.
     _airplane = GetComponent <AeroplaneController>();
 }