protected void Mute() { stopTalking = true; stringBuilder.Length = 0; stringBuilder.AppendFormat("{0} is being muted.", MyName); ThingConsole.LogWarning(stringBuilder.ToString()); }
// Update is called once per frame void Update() { float hour = sky.Cycle.Hour; if (hour > 19f && hour < 19.2f && !sunsetReported) { print("------Sunset------"); if (OnSunset != null) { OnSunset(); } ThingConsole.LogWarning("Sunset"); sunsetReported = true; IsDay = false; IsNight = true; Invoke("ResetSunsetReportFlag", reportCoolDown); } if (hour > 7f && hour < 7.2f && !sunriseReported) { print("------Sunrise------"); if (OnSunrise != null) { OnSunrise(); } ThingConsole.LogWarning("Sunrise"); IsDay = true; IsNight = false; sunriseReported = true; Invoke("ResetSunriseReportFlag", reportCoolDown); } }
private void Start() { //neighbor detector neighborDetector = GetComponent <SphereCollider> (); neighborDetector.isTrigger = true; //motor motor = GetComponent <ThingMotor> (); motor.SetAccel(settings.acceleration); motor.rb.drag = settings.drag; motor.rb.mass = settings.mass; motor.FacingTarget(settings.alwaysFacingTarget); //Instantiating Particle Object explodePS = GetComponentInChildren <ParticleSystem> (); if (explodePS == null) { stringBuilder.Length = 0; stringBuilder.AppendFormat("{0} doesn't have a particle system?!", MyName); ThingConsole.LogWarning(stringBuilder.ToString()); } //Sound audioSource = gameObject.GetComponent <AudioSource> (); audioSource.rolloffMode = AudioRolloffMode.Linear; audioSource.spatialBlend = 1f; audioSource.maxDistance = 50; TTTStart(); }
private void RescueFromWater() { if (InWater) { ResetPosition(); ThingConsole.LogWarning(FormatString("{0} is rescued from water", MyName)); } }
private void RescueFromWater() { if (InWater) { ResetPosition(); stringBuilder.Length = 0; stringBuilder.AppendFormat("{0} is rescued from water", MyName); ThingConsole.LogWarning(stringBuilder.ToString()); } }
private void Start() { //neighbor detector // neighborDetector = GetComponent<SphereCollider> (); // neighborDetector.isTrigger = true; //no longer use sphere collider as neighbor detector if (GetComponent <SphereCollider>()) { Destroy(GetComponent <SphereCollider>()); } //motor motor = GetComponent <ThingMotor>(); motor.SetAccel(settings.acceleration * 4); motor.rb.drag = settings.drag; motor.rb.mass = settings.mass; motor.FacingTarget(settings.alwaysFacingTarget); //Instantiating Particle Object explodePS = GetComponentInChildren <ParticleSystem>(); if (explodePS == null) { ThingConsole.LogWarning(FormatString("{0} doesn't have a particle system?!", MyName)); } //Sound audioSource = gameObject.GetComponent <AudioSource>(); audioSource.playOnAwake = false; audioSource.loop = false; audioSource.bypassListenerEffects = false; audioSource.spatialBlend = 1f; audioSource.maxDistance = 35; audioSource.dopplerLevel = 5; //material var renderers = gameObject.GetComponentsInChildren <MeshRenderer>(); foreach (var rend in renderers) { rend.material = ColorManager.instance.GetMaterial(1f, Random.Range(0f, 1f) > 0.6f ? true : false); } TTTStart(); speakCD.GoCooldown(); }
// Update is called once per frame void Update() { float hour = sky.Cycle.Hour; if (hour > 19f && hour < 19.2f && !sunsetReported) { print("------Sunset------"); if (OnSunset != null) { OnSunset(); } ThingConsole.LogWarning("Sunset"); sunsetReported = true; IsDay = false; IsNight = true; Invoke("ResetSunsetReportFlag", reportCoolDown); } if (hour > 7f && hour < 7.2f && !sunriseReported) { print("------Sunrise------"); if (OnSunrise != null) { OnSunrise(); } ThingConsole.LogWarning("Sunrise"); IsDay = true; IsNight = false; sunriseReported = true; Invoke("ResetSunriseReportFlag", reportCoolDown); } stringBuilder.Length = 0; stringBuilder.AppendFormat("\n\n{0}", sky.Cycle.DateTime.TimeOfDay.ToString()); timeText.text = stringBuilder.ToString(); }
protected void Mute() { stopTalking = true; ThingConsole.LogWarning(FormatString("{0} is being muted.", MyName)); }
protected void DeMute() { stopTalking = false; ThingConsole.LogWarning(gameObject.name + "can speak again."); }
protected void Mute() { stopTalking = true; ThingConsole.LogWarning(gameObject.name + "is being muted"); }