Exemple #1
0
    void OnTriggerEnter(Collider targetCollider)
    {
        if(targetCollider != null){
            //Debug.Log(targetCollider.name + " killed");
            target = targetCollider.gameObject.GetComponent("Translating") as Translating;
            targetFlashlight = targetCollider.gameObject.GetComponent("FlashlightScript") as FlashlightScript;
            targetAudioSource = targetCollider.gameObject.GetComponent("AudioSource") as AudioSource;

            //if(target == null)
            //	Debug.Log ("Broken =(");

            if(target != null && targetFlashlight != null && targetAudioSource != null){
                if(target.movementEnabled){ //FUUUUUUUUUU
                    target.animation.Play("faint",PlayMode.StopAll);
                }

                target.movementEnabled = false;
                targetFlashlight.isActivated = false;
                targetAudioSource.enabled = false;

                GamePad.SetVibration(0, 1, 1);
            }
        }
    }
Exemple #2
0
 // Use this for initialization
 void Start()
 {
     mCharScript = mainChar.GetComponent<MainCharRandomMov>();
     mFlashScript = mainCamera.GetComponent<FlashlightScript>();
     mLightEffects = mainLight.GetComponent<LightEffects>();
 }
Exemple #3
0
 // Use this for initialization
 void Start()
 {
     mScript = MainCamera.GetComponent<FlashlightScript>();
     lightFlicker = gameObject.GetComponentInChildren<Light>();
     //maxCharge = totalCharge;
 }
 /// <summary>
 /// Start this instance and get flashlight script component
 /// </summary>
 void Start()
 {
     flashLight = GetComponentInParent<FlashlightScript> ();
 }
 // Use this for initialization
 void Start()
 {
     mScript = Light.GetComponent<FlashlightScript>();
     cameraCanBeChanged = false;
 }
Exemple #6
0
 void Start()
 {
     Flashlight  = GetComponent <FlashlightScript>();
     gameManager = scriptManager.GetScript <HFPS_GameManager>();
 }
 // Use this for initialization
 void Start()
 {
     mScript = MainCamera.GetComponent<FlashlightScript>();
 }
 /// <summary>
 /// Start this instance and Get FlashlightScript
 /// </summary>
 void Start()
 {
     flashlight = GetComponentInChildren<FlashlightScript> ();
 }
    // Use this for initialization
    void Start()
    {
        enemyInLightSpeed = 15f;
        enemyFleeLightSpeed = 40f;
        mainCharInLightSpeed = 30f;
        stateDark = "DirSelect";
        mScript = MainCharacter.GetComponent<MainCharRandomMov>();
        mFlashScript = MainCamera.GetComponent<FlashlightScript>();
        mBombScript = FlashBombLight.GetComponent<FlashBombScript>();

        //        flashbombLight = GameObject.FindGameObjectWithTag("FlashbombLight");
        //        flashBombAudio = GameObject.FindGameObjectWithTag("FlashBombAudio");
    }