////////////////////////////////////////////////// void OnEnterWater(WaterEnterEvent type) { var radiusStrength = GetRadiusStrength(type); TerrorMap.Instance.WriteEvent(transform.position, radiusStrength.x, radiusStrength.y); }
Vector2 GetRadiusStrength(WaterEnterEvent type) { switch(type) { case WaterEnterEvent.NoseIn: return m_noseInRadiusStrength; case WaterEnterEvent.BellyFlop: return m_bellySplashRadiusStrength; case WaterEnterEvent.BackFlop: return m_backFlopRadiusStrength; case WaterEnterEvent.TailIn: return m_tailInRadiusStrength; default: return Vector2.zero; } }
void OnEnterWater(WaterEnterEvent type) { Time.timeScale = 1f; //childMesh.renderer.material.color = Color.green; cameraObject.GetComponent<SharkAttackCamera>().enabled = false; cameraObject.GetComponent<FollowCamera>().enabled = true; }