public void MoveTheCat(PositionByDeltaTime testCase) { var cat = ACat(withPosition: Vector3.zero, withSpeed: testCase.CatSpeed); var anInGameCat = AnInGameCat(withCat: cat); var moveCommander = new MoveCat(anInGameCat); moveCommander.Execute(testCase.Direction, testCase.DeltaTime); Assert.AreEqual(testCase.ExpectedPosition, anInGameCat.GetPosition()); }
private void Start() { var startPosition = new Vector3(0, _cat.transform.position.y, 0); var cat = new Cat(startPosition, 10, Cat.CatStatus.Grounded, Vector3.zero, 1, Vector3.forward); var inGameCat = new InGameCat(cat); var moveAction = new MoveCat(inGameCat); var jumpAction = new Jump(inGameCat); catInputControl.Initialize(moveAction, jumpAction, inGameCat); }
protected void Start() { // this is just used to instantiate the health of the evil cat (class with static methods) as soon as the evil cat itself is instatiated evilHealth = EvilHealth.Instance; this.gameObject.AddComponent<EvilHealthDisplay>(); healthDisplay = this.GetComponent<EvilHealthDisplay>(); this.gameObject.AddComponent<MoveCat>(); move = this.GetComponent<MoveCat>(); move.AddVectorsToList (); this.gameObject.AddComponent<EvilBasicFire>(); fire = this.GetComponent<EvilBasicFire>(); fire.ShootAtPlayer (); }
public void Initialize(MoveCat moveCat, Jump jump, InGameCat inGameCat) { _moveCatCat = moveCat; _jump = jump; _inGameCat = inGameCat; }