Example #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);
            }
        }
    }
Example #2
0
 // Use this for initialization
 void Start()
 {
     mCharScript = mainChar.GetComponent<MainCharRandomMov>();
     mFlashScript = mainCamera.GetComponent<FlashlightScript>();
     mLightEffects = mainLight.GetComponent<LightEffects>();
 }
Example #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;
 }
Example #6
0
 void Start()
 {
     Flashlight  = GetComponent <FlashlightScript>();
     gameManager = scriptManager.GetScript <HFPS_GameManager>();
 }
 // Use this for initialization
 void Start()
 {
     mScript = MainCamera.GetComponent<FlashlightScript>();
 }
Example #8
0
 /// <summary>
 /// Start this instance and Get FlashlightScript
 /// </summary>
 void Start()
 {
     flashlight = GetComponentInChildren<FlashlightScript> ();
 }
Example #9
0
    // 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");
    }