public void RemoveGame() { if (_game != null) { SocketAttacher socketAttacher = GetComponent <SocketAttacher>(); socketAttacher.DetachFromGameSocket(_game); socketAttacher.MoveToDropSocket(_game); } _game = null; _currAbility = null; animator.SetBool("Unhappy", false); animator.SetBool("Working", false); }
private void PickUpGame(Collision collision) { if (currGame != null) { return; } var body = collision.gameObject; if (!body.CompareTag(Game.tagName)) { return; } var game = DetachGame(); if (game != null) { socketAttacher.MoveToDropSocket(game); } currGame = body.GetComponent <Game>(); AttachGame(); }