public void SolveCollision() { if (!isGrabbable) { fireworkGO.SetActive(true); fireworkGO.transform.parent = null; Destroy(fireworkGO, 6f); attachedStatic.UpdateGifts(this.gameObject); explodeSFX.clip = GameManager.Instance.GetOrchestraClip(); explodeSFX.Play(); GameManager.Instance.UpdateOrchestra(); FloatingPoints pts = Instantiate(floatingPoints, this.transform.position, Quaternion.identity).GetComponent <FloatingPoints>(); pts.points = 1500; GetComponent <MeshRenderer>().enabled = false; Destroy(this.gameObject, explodeSFX.clip.length); GameManager.Instance.AddScore(1500); } else if (isGrabbable) { this.GetComponent <Animator>().enabled = false; grabber.SetActive(true); if (attachedStatic != null) { attachedStatic.UpdateGifts(this.gameObject); } BoxCollider col = this.GetComponent <BoxCollider>(); if (col != null) { col.enabled = false; } GameManager.Instance.AddScore(1500); Destroy(this.gameObject, 10f); } }
public FloatingPoints(KaitaiStream p__io, KaitaiStruct p__parent = null, FloatingPoints p__root = null) : base(p__io) { m_parent = p__parent; m_root = p__root ?? this; f_singleValuePlusInt = false; f_singleValuePlusFloat = false; f_doubleValuePlusFloat = false; _read(); }
private void OnCollisionEnter(Collision collision) { if (collision.gameObject.GetComponent <ProjectileBehaviour>() != null) { FloatingPoints pts = Instantiate(floatingPoints, this.transform.position, Quaternion.identity).GetComponent <FloatingPoints>(); pts.points = value; GameManager.Instance.AddScore(value); } Explode(); }
private void OnCollisionEnter(Collision collision) { if (collision.gameObject.GetComponent <ProjectileBehaviour>() != null) { if (grantedPoints == false) { FloatingPoints pts = Instantiate(floatingPoints, this.transform.position, Quaternion.identity).GetComponent <FloatingPoints>(); pts.points = value; GameManager.Instance.AddScore(value); ResetPointValue(); Invoke("ResetPointValue", 1.0f); } } }
public void Test_03_FloatingPointNumbers() { FloatingPoints Obj = new FloatingPoints() { S = 1.2345F, D = 1.2345, Dec = 1.2345M }; byte[] Bin = this.endpoint.Serialize(Obj); FloatingPoints Obj2 = this.endpoint.Deserialize(Bin) as FloatingPoints; Assert.IsNotNull(Obj2); Assert.AreEqual(Obj.S, Obj2.S); Assert.AreEqual(Obj.D, Obj2.D); Assert.AreEqual(Obj.Dec, Obj2.Dec); }