public void StartPush(Pushable pushable) { if (!Pushing) { // TODO: Use the pushable's weight Debug.Log(name + " started pushing " + pushable.name); Pushing = true; //_pushable = pushable; } }
private bool CheckPush(GameObject go) { bool result = false; if (_player != null) { Pushable pushable = go.GetComponent <Pushable>(); if (pushable != null) { _player.StartPush(pushable); result = true; } else { _player.EndPush(); } } return(result); }