Exemple #1
0
        public void LieDown(Character character)
        {
            _character = character;
            _previousParent = _character.transform.parent;
            _previousPosition = _character.transform.position;
            _previousRotation = _character.transform.rotation;

            _character.transform.SetParent(LiePosition,false);
            _character.transform.rotation = LiePosition.rotation;
           
            var offset = Vector3.up*_character.Body.Height*0.5f;
            _character.transform.localPosition = -offset;
            IsOccupied = true;
            _character.IsSleeping = true;
        }
Exemple #2
0
 private void Start()
 {
     DistanceLabel.text = "";
     _character = GetComponentInParent<Character>();
 }