void OnTriggerEnter2D(Collider2D col) { //Debug.Log(col.gameObject.name + " : " + gameObject.name + " : " + Time.time); InspectorObject inspector = FindObjectOfType <InspectorObject>(); inspector.GameOver(); }
void OnTriggerEnter2D(Collider2D col) { Debug.Log("WIIN " + col.gameObject.name.ToString()); InspectorObject inspector = FindObjectOfType <InspectorObject>(); inspector.GameWin(); }
private void EventEnd() { //SpriteRenderer blowButton_sr = blowButton.GetComponent<SpriteRenderer>(); //blowButton_sr.sprite = Resources.Load<Sprite>("elementStone011"); //blowButton.enabled = true; var main = fire_ps.main; main.maxParticles = 6; fire_ps.Play(); isEnable = false; FlyingBall flyingBall = FindObjectOfType <FlyingBall>(); flyingBall.BlowUpLight(); InspectorObject inspector = FindObjectOfType <InspectorObject>(); inspector.setNightNoLight(false); }
void OnTriggerEnter2D(Collider2D col) { flyingBall = FindObjectOfType <FlyingBall>(); Debug.Log(col.gameObject.name + " : " + gameObject.name + " : " + Time.time); MouseDragAndDrop go = col.gameObject.GetComponent <MouseDragAndDrop>(); go.dropped = true; go.dragging = false; if (go.rigidBody1 != null) { flyingBall.dropObject(go.rigidBody1.mass); Debug.Log(go.rigidBody1.mass); } InspectorObject inspector = FindObjectOfType <InspectorObject>(); inspector.dropObject(go.rigidBody1.mass); }
public void EventStart() { Debug.Log("EventLighter Start"); //SpriteRenderer blowButton_sr = blowButton.GetComponent<SpriteRenderer>(); //blowButton_sr.sprite = Resources.Load<Sprite>("elementStone054"); //blowButton.enabled = false; if (!isEnable) { var main = fire_ps.main; main.maxParticles = 0; fire_ps.Stop(); isEnable = true; FlyingBall flyingBall = FindObjectOfType <FlyingBall>(); flyingBall.BlowDownLight(); InspectorObject inspector = FindObjectOfType <InspectorObject>(); inspector.setNightNoLight(true); } }