Exemple #1
0
        public void StartPush(Pushable pushable)
        {
            if (!Pushing)
            {
                // TODO: Use the pushable's weight

                Debug.Log(name + " started pushing " + pushable.name);
                Pushing = true;
                //_pushable = pushable;
            }
        }
Exemple #2
0
        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);
        }