コード例 #1
0
        protected override void PhysicsUpdate()
        {
            float deltaTime = Time.fixedDeltaTime;

            _constantRipplesModule.PhysicsUpdate(deltaTime);

            if (!_simulationModule.IsControlledByLargeWaterAreaManager)
            {
                _simulationModule.PhysicsUpdate(deltaTime);
            }
        }
コード例 #2
0
        protected override void PhysicsUpdate()
        {
            float deltaTime = Time.fixedDeltaTime * Game2DWaterKitObject.TimeScale;

            _constantRipplesModule.PhysicsUpdate(deltaTime);
            _onCollisonRipplesModule.PhysicsUpdate();

            if (!_simulationModule.IsControlledByLargeWaterAreaManager)
            {
                _simulationModule.PhysicsUpdate(deltaTime);
            }
        }
コード例 #3
0
        private void FixedUpdate()
        {
            float deltaTime = Time.fixedDeltaTime;

            WaterSimulationModule currentSimulationModule = _leftMostWaterSimulationModule;

            while (currentSimulationModule != null)
            {
                currentSimulationModule.PhysicsUpdate(deltaTime);
                if (currentSimulationModule.SurfaceHeighestPoint > _waterSurfaceHeighestPoint)
                {
                    _waterSurfaceHeighestPoint = currentSimulationModule.SurfaceHeighestPoint;
                }

                currentSimulationModule = currentSimulationModule.NextWaterSimulationModule;
            }
        }