Пример #1
0
    //-Chaos
    //Since collision with player is disabled, this is useless

    /*
     * private void OnTriggerEnter2D(Collider2D collision)
     * {
     *  if(collision.gameObject.tag == "Player")
     *  {
     *      playerShurikenScript.ReturnShuriken();
     *      Destroy(gameObject);
     *  }
     * }
     */
    //I moved it to another function
    private void ReturnToPlayer()
    {
        playerShurikenScript.ReturnShuriken(this);
        Destroy(gameObject);
    }