public PlayerCharacter(ICharSpace charSpace, Transform startingLocation) { _anims = new PlayerCharacterAnimations(); _transform = startingLocation; _charSpace = charSpace; Input.ClearBindings(); Input.OnDirection(UpdatePhysics); }
public PlayerCharacter(CharacterSex sex, ICharSpace charSpace, Transform2 startingLocation) { _anims = new PlayerCharacterAnimations(sex); _components.Add(new Hunger()); _components.Add(new PlayerEnergy()); _transform = startingLocation; _charSpace = charSpace; Input.ClearBindings(); Input.OnDirection(UpdatePhysics); Input.On(Control.A, Interact); World.Subscribe(EventSubscription.Create <WentToBed>((e) => WentToBed(), this)); World.Subscribe(EventSubscription.Create <Awaken>((e) => Awaken(), this)); World.Subscribe(EventSubscription.Create <CollapsedWithExhaustion>((e) => _isSleeping = true, this)); World.Subscribe(EventSubscription.Create <InteractionStarted>(x => _isInteracting = true, this)); World.Subscribe(EventSubscription.Create <InteractionFinished>(x => _isInteracting = false, this)); }