示例#1
0
 // Use this for initialization
 void Start()
 {
     catcher      = GetComponent <MemeCatcher>();
     physics      = GetComponent <Rigidbody2D>();
     hitBox       = GetComponent <BoxCollider2D>();
     currentSpeed = baseSpeed;
 }
示例#2
0
    public override bool onCatch(MemeCatcher _catcher)
    {
        base.onCatch(_catcher);

        EventSystem.dispatchEvent(new Event(EventType.PLAYER_HIT));

        Destroy(gameObject);

        return(false);
    }
示例#3
0
    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);
    }