public virtual void Update(GameTime gt) { if (moveBehaviour != null) { moveBehaviour.Move(ref position, ref direction); } }
public virtual void Update(GameTime gt, List <GameEntity> game_elements) { if (moveBehaviour1 != null) { moveBehaviour1.Move(this, game_elements); } if (moveBehaviour2 != null) { moveBehaviour2.Move(this, game_elements); } }
// Update is called once per frame void Update() { if (currentNode == null || isDead) { return; } // Check if reached node. float distance = Vector3.Distance(transform.position, currentNode.transform.position); if (distance < moveBehaviour.Speed * Time.deltaTime) { currentNode = currentNode.NextNode; if (currentNode == null) { // We reached the end of the path, so go away ^^ Debug.Log("Reached end"); DamagePlayer(); return; } } moveBehaviour.Move(currentNode.transform.position); }
public void Update(GameTime gt) { UpdateInput(); moveBehaviour.Move(ref position, ref direction); }
public void Move() { moveBehaviour.Move(); }