public void Execute(Vector3 airForce) { var cat = _inGameCat.Get(); if (airForce.y > 0 && cat.Status != Cat.CatStatus.Jumping) { _inGameCat.Update(cat.Jump(airForce)); } }
private void Update() { var h = Input.GetAxis("Horizontal"); var v = Input.GetAxis("Vertical"); if (Input.GetKeyDown(KeyCode.Space)) { _jump.Execute(_airForce); _catView.MakeJump(_inGameCat.Get()); } if (!(Math.Abs(h) > 0.1f) && !(Math.Abs(v) > 0.1f)) { return; } _moveCatCat.Execute(new Vector3(h, 0, v), Time.deltaTime); _catView.UpdatePosition(_inGameCat.Get()); }
public void Execute(Thing thing) { var thingToBite = thing; if (_inGameCat.Get().CanBite(thing)) { thingToBite = thing.Bitten(_inGameCat); } _inGameThings.UpdateThings(thingToBite); }
public void Execute(Vector3 direction, float deltaTime) { var cat = _anInGameCat.Get(); _anInGameCat.Update(cat.Move(direction, deltaTime)); }