Beispiel #1
0
 void Awake()
 {
     game = FindObjectOfType<GameController>();
     music = GetComponents<AudioSource>();
     reverb = GetComponent<AudioReverbZone>();
     starDome = GameObject.Find("Stardome").transform;
     star = GameObject.Find("Stardome/Star");
     star2 = GameObject.Find("Stardome/Star 2");
     sunlight = GameObject.Find("Lighting/Sunlight").GetComponent<Light>();
 }
    // Use this for initialization
    void Start()
    {
        mood = moodObject.GetComponent<PlayerStatBar>();
        sobriety = sobrietyObject.GetComponent<PlayerStatBar>();

        lastSobriety = sobriety.getStatValue();

        this.reverbZone = boombox.GetComponent<AudioReverbZone>();
        this.audioSource = boombox.GetComponent<AudioSource>();
    }
	static public int constructor(IntPtr l) {
		try {
			UnityEngine.AudioReverbZone o;
			o=new UnityEngine.AudioReverbZone();
			pushValue(l,true);
			pushValue(l,o);
			return 2;
		}
		catch(Exception e) {
			return error(l,e);
		}
	}
 public static int constructor(IntPtr l)
 {
     try {
         UnityEngine.AudioReverbZone o;
         o=new UnityEngine.AudioReverbZone();
         pushValue(l,o);
         return 1;
     }
     catch(Exception e) {
         LuaDLL.luaL_error(l, e.ToString());
         return 0;
     }
 }
 static public int set_maxDistance(IntPtr l)
 {
     try {
         UnityEngine.AudioReverbZone self = (UnityEngine.AudioReverbZone)checkSelf(l);
         float v;
         checkType(l, 2, out v);
         self.maxDistance = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
 static public int set_reverbPreset(IntPtr l)
 {
     try {
         UnityEngine.AudioReverbZone   self = (UnityEngine.AudioReverbZone)checkSelf(l);
         UnityEngine.AudioReverbPreset v;
         checkEnum(l, 2, out v);
         self.reverbPreset = v;
         pushValue(l, true);
         return(1);
     }
     catch (Exception e) {
         return(error(l, e));
     }
 }
Beispiel #7
0
 static void AudioReverbZone_room(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.AudioReverbZone _this = (UnityEngine.AudioReverbZone)vc.csObj;
         var result = _this.room;
         JSApi.setInt32((int)JSApi.SetType.Rval, (System.Int32)(result));
     }
     else
     {
         System.Int32 arg0 = (System.Int32)JSApi.getInt32((int)JSApi.GetType.Arg);
         UnityEngine.AudioReverbZone _this = (UnityEngine.AudioReverbZone)vc.csObj;
         _this.room = arg0;
     }
 }
Beispiel #8
0
 static void AudioReverbZone_reverbPreset(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.AudioReverbZone _this = (UnityEngine.AudioReverbZone)vc.csObj;
         var result = _this.reverbPreset;
         JSApi.setEnum((int)JSApi.SetType.Rval, (int)result);
     }
     else
     {
         UnityEngine.AudioReverbPreset arg0  = (UnityEngine.AudioReverbPreset)JSApi.getEnum((int)JSApi.GetType.Arg);
         UnityEngine.AudioReverbZone   _this = (UnityEngine.AudioReverbZone)vc.csObj;
         _this.reverbPreset = arg0;
     }
 }
Beispiel #9
0
 static void AudioReverbZone_maxDistance(JSVCall vc)
 {
     if (vc.bGet)
     {
         UnityEngine.AudioReverbZone _this = (UnityEngine.AudioReverbZone)vc.csObj;
         var result = _this.maxDistance;
         JSApi.setSingle((int)JSApi.SetType.Rval, (System.Single)(result));
     }
     else
     {
         System.Single arg0 = (System.Single)JSApi.getSingle((int)JSApi.GetType.Arg);
         UnityEngine.AudioReverbZone _this = (UnityEngine.AudioReverbZone)vc.csObj;
         _this.maxDistance = arg0;
     }
 }
 /// <summary>
 /// Write the specified value using the writer.
 /// </summary>
 /// <param name="value">Value.</param>
 /// <param name="writer">Writer.</param>
 public override void Write(object value, ISaveGameWriter writer)
 {
     UnityEngine.AudioReverbZone audioReverbZone = (UnityEngine.AudioReverbZone)value;
     writer.WriteProperty("minDistance", audioReverbZone.minDistance);
     writer.WriteProperty("maxDistance", audioReverbZone.maxDistance);
     writer.WriteProperty("reverbPreset", audioReverbZone.reverbPreset);
     writer.WriteProperty("room", audioReverbZone.room);
     writer.WriteProperty("roomHF", audioReverbZone.roomHF);
     writer.WriteProperty("roomLF", audioReverbZone.roomLF);
     writer.WriteProperty("decayTime", audioReverbZone.decayTime);
     writer.WriteProperty("decayHFRatio", audioReverbZone.decayHFRatio);
     writer.WriteProperty("reflections", audioReverbZone.reflections);
     writer.WriteProperty("reflectionsDelay", audioReverbZone.reflectionsDelay);
     writer.WriteProperty("reverb", audioReverbZone.reverb);
     writer.WriteProperty("reverbDelay", audioReverbZone.reverbDelay);
     writer.WriteProperty("HFReference", audioReverbZone.HFReference);
     writer.WriteProperty("LFReference", audioReverbZone.LFReference);
     writer.WriteProperty("diffusion", audioReverbZone.diffusion);
     writer.WriteProperty("density", audioReverbZone.density);
     writer.WriteProperty("enabled", audioReverbZone.enabled);
     writer.WriteProperty("tag", audioReverbZone.tag);
     writer.WriteProperty("name", audioReverbZone.name);
     writer.WriteProperty("hideFlags", audioReverbZone.hideFlags);
 }
 // Use this for initialization
 void Start()
 {
     test = GetComponent("AudioReverbZone") as AudioReverbZone;
     tempController = GetComponent<CharacterController>();
     decayMovement = new Vector3 (0, 0, 0);
 }
 static public int get_maxDistance(IntPtr l)
 {
     UnityEngine.AudioReverbZone o = (UnityEngine.AudioReverbZone)checkSelf(l);
     pushValue(l, o.maxDistance);
     return(1);
 }
 static public int get_roomHF(IntPtr l)
 {
     UnityEngine.AudioReverbZone o = (UnityEngine.AudioReverbZone)checkSelf(l);
     pushValue(l, o.roomHF);
     return(1);
 }
 static public int get_reflectionsDelay(IntPtr l)
 {
     UnityEngine.AudioReverbZone o = (UnityEngine.AudioReverbZone)checkSelf(l);
     pushValue(l, o.reflectionsDelay);
     return(1);
 }
 static public int get_diffusion(IntPtr l)
 {
     UnityEngine.AudioReverbZone o = (UnityEngine.AudioReverbZone)checkSelf(l);
     pushValue(l, o.diffusion);
     return(1);
 }
 void OnEnable()
 {
     cachedZone = GetComponent<AudioReverbZone>();
 }
 static public int get_decayHFRatio(IntPtr l)
 {
     UnityEngine.AudioReverbZone o = (UnityEngine.AudioReverbZone)checkSelf(l);
     pushValue(l, o.decayHFRatio);
     return(1);
 }
Beispiel #18
0
    void Start()
    {
        if(Camera.main.GetComponent<AudioReverbZone>())
        {
            reverbZone = Camera.main.GetComponent<AudioReverbZone>();
        }
        spiritParticlesR = Camera.main.GetComponentInChildren<ParticleSystemRenderer>();
        sPRColorStart = spiritParticlesR.material.GetColor("_TintColor");
        spiritParticlesR.material.SetColor("_TintColor", new Color(sPRColorStart.r, sPRColorStart.g, sPRColorStart.b, 0));
        //		RenderSettings.ambientLight = new Color(1,1,1);
        startAmbientL = RenderSettings.ambientLight;
        spiritObj = GameObject.Find("Spirit");
        playerController = playerObj.GetComponent<CharacterController>();
        playerVelocity = playerController.velocity;
        playerMove = playerObj.GetComponent<PlayerMovement>();

        spiritMove = spiritObj.GetComponent<SpiritMovement>();
        spiritGfx = spiritObj.transform.GetChild(0).gameObject;
        spiritGfxMesh = spiritGfx.transform.GetChild(0).gameObject;

        spiritMove.activeMovement = false;
        //		spiritObj.renderer.enabled = false;
        spiritObj.GetComponent<Collider>().enabled = false;
        spiritGfx.SetActive(false);
        charMesh = transform.GetChild(0).transform.GetChild(0);
        dir = -1;
        switchable =true;
    }
        /// <summary>
        /// Read the data into the specified value.
        /// </summary>
        /// <param name="value">Value.</param>
        /// <param name="reader">Reader.</param>
        public override void ReadInto(object value, ISaveGameReader reader)
        {
            UnityEngine.AudioReverbZone audioReverbZone = (UnityEngine.AudioReverbZone)value;
            foreach (string property in reader.Properties)
            {
                switch (property)
                {
                case "minDistance":
                    audioReverbZone.minDistance = reader.ReadProperty <System.Single> ();
                    break;

                case "maxDistance":
                    audioReverbZone.maxDistance = reader.ReadProperty <System.Single> ();
                    break;

                case "reverbPreset":
                    audioReverbZone.reverbPreset = reader.ReadProperty <UnityEngine.AudioReverbPreset> ();
                    break;

                case "room":
                    audioReverbZone.room = reader.ReadProperty <System.Int32> ();
                    break;

                case "roomHF":
                    audioReverbZone.roomHF = reader.ReadProperty <System.Int32> ();
                    break;

                case "roomLF":
                    audioReverbZone.roomLF = reader.ReadProperty <System.Int32> ();
                    break;

                case "decayTime":
                    audioReverbZone.decayTime = reader.ReadProperty <System.Single> ();
                    break;

                case "decayHFRatio":
                    audioReverbZone.decayHFRatio = reader.ReadProperty <System.Single> ();
                    break;

                case "reflections":
                    audioReverbZone.reflections = reader.ReadProperty <System.Int32> ();
                    break;

                case "reflectionsDelay":
                    audioReverbZone.reflectionsDelay = reader.ReadProperty <System.Single> ();
                    break;

                case "reverb":
                    audioReverbZone.reverb = reader.ReadProperty <System.Int32> ();
                    break;

                case "reverbDelay":
                    audioReverbZone.reverbDelay = reader.ReadProperty <System.Single> ();
                    break;

                case "HFReference":
                    audioReverbZone.HFReference = reader.ReadProperty <System.Single> ();
                    break;

                case "LFReference":
                    audioReverbZone.LFReference = reader.ReadProperty <System.Single> ();
                    break;

                case "diffusion":
                    audioReverbZone.diffusion = reader.ReadProperty <System.Single> ();
                    break;

                case "density":
                    audioReverbZone.density = reader.ReadProperty <System.Single> ();
                    break;

                case "enabled":
                    audioReverbZone.enabled = reader.ReadProperty <System.Boolean> ();
                    break;

                case "tag":
                    audioReverbZone.tag = reader.ReadProperty <System.String> ();
                    break;

                case "name":
                    audioReverbZone.name = reader.ReadProperty <System.String> ();
                    break;

                case "hideFlags":
                    audioReverbZone.hideFlags = reader.ReadProperty <UnityEngine.HideFlags> ();
                    break;
                }
            }
        }
 /// <summary>
 /// Read the data using the reader.
 /// </summary>
 /// <param name="reader">Reader.</param>
 public override object Read(ISaveGameReader reader)
 {
     UnityEngine.AudioReverbZone audioReverbZone = SaveGameType.CreateComponent <UnityEngine.AudioReverbZone> ();
     ReadInto(audioReverbZone, reader);
     return(audioReverbZone);
 }
 void OnDisable()
 {
     cachedZone = null;
     Deactivate();
 }
Beispiel #22
0
 static public int get_reverbPreset(IntPtr l)
 {
     UnityEngine.AudioReverbZone o = (UnityEngine.AudioReverbZone)checkSelf(l);
     pushEnum(l, (int)o.reverbPreset);
     return(1);
 }