private void OnTriggerStay2D(Collider2D collision) { /*if (collision.gameObject.tag == "Star" && Input.GetKeyDown(KeyCode.J)&&Catch) * { * boolFlingOff = true; * boolFollow.enabled = true; * boolSimulated.simulated = false; * boolFollow.target = collision.gameObject.GetComponent<Transform>(); * Star = collision.gameObject.GetComponent<BoxCollider2D>(); * _Star = collision.gameObject.GetComponent<SpriteRenderer>(); * }*/ if (collision.gameObject.tag == "Star") { DissolvedBool = collision.gameObject.GetComponent <D2dRepeatStamp>(); if (Dissolve) { DissolvedBool.enabled = true; } } }
// Use this for initialization void Start() { script = GetComponent <D2dRepeatStamp>(); baseDelay = script.Delay; }