GetIsGameObjectActive() public static method

public static GetIsGameObjectActive ( UnityEngine in_GameObjId ) : bool
in_GameObjId UnityEngine
return bool
Beispiel #1
0
    public override void StartUsing(GameObject usingObject)
    {
        base.StartUsing(usingObject);
        controllerActions = usingObject.GetComponent <VRTK.VRTK_ControllerActions>();



        if (!isUsed)
        {
            bool a = AkSoundEngine.GetIsGameObjectActive(this.gameObject);
            if (!alreadybeenused)
            {
                StartCoroutine(vibrations());
                AkSoundEngine.PostEvent("answering_machine", this.gameObject);
            }
            else
            {
                StartCoroutine(vibrations());
                AkSoundEngine.PostEvent("answering_machine_2", this.gameObject);
            }

            controllerActions.TriggerHapticPulse(0.63f, 0.2f, 0.01f);

            bool b = AkSoundEngine.GetIsGameObjectActive(this.gameObject);
            controllerActions.TriggerHapticPulse(0.63f, 0.2f, 0.01f);
            isUsed          = true;
            alreadybeenused = true;
            this.gameObject.GetComponentInChildren <blinklight>().usage(isUsed);
        }
    }
Beispiel #2
0
    // Update is called once per frame
    void Update()
    {
        if (playing && !AkSoundEngine.GetIsGameObjectActive(this.gameObject))

        {
            playing = false;
        }
    }
Beispiel #3
0
    // Update is called once per frame
    void Update()
    {
        if (isUsed && !AkSoundEngine.GetIsGameObjectActive(this.gameObject))

        {
            isUsed = false;
            this.gameObject.GetComponentInChildren <blinklight>().usage(isUsed);
        }



        // Debug.Log(isUsed);
    }