public override void advanceEnemy(float playerDistance, Vector3 playerPosition) { cannon.transform.forward = Vector3.RotateTowards(cannon.transform.forward, playerPosition - gameObject.transform.position, Constants.cannonTrackSpeed_anchor, 0.0f); if (!canFireCannon) { handleCannonCooldown(); } else if (isFiringCannon) { handleCannonBurstFire(); } else if (playerDistance < Constants.cannonballEffectiveDistance_enemy) { beginFiringCannon(); } wakeController.updateWakes(); }
public override void advanceAnimation(Vector3 boatPos) { objectPrefab.transform.eulerAngles += Vector3.up * Constants.itemRotationAmount; wakeController.updateWakes(); if (!notBeingDrawnIn) { if (chainDist < 1f) { chainDist += Constants.itemChainMoveSpeed; if (chainDist > 1f) { chainDist = 1f; } } else { moveAmount += Constants.itemAcceleration; objectPrefab.transform.position = Vector3.MoveTowards(objectPrefab.transform.position, boatPos, moveAmount); } updateChainPosition(boatPos); } }
public override void advanceEnemy(float playerDistance, Vector3 playerPosition) { rotateRing(playerDistance); wakeController.updateWakes(); }