// Use this for initialization void Start() { catcher = GetComponent <MemeCatcher>(); physics = GetComponent <Rigidbody2D>(); hitBox = GetComponent <BoxCollider2D>(); currentSpeed = baseSpeed; }
public override bool onCatch(MemeCatcher _catcher) { base.onCatch(_catcher); EventSystem.dispatchEvent(new Event(EventType.PLAYER_HIT)); Destroy(gameObject); return(false); }
public virtual bool onCatch(MemeCatcher _catcher) { if (_catcher.heldMemes.Count >= _catcher.memeLimit) { return(true); } ProjectileMover mover = GetComponent <ProjectileMover>(); if (mover != null) { Destroy(mover); } return(true); }