private void ConfigureShockwave()
        {
            var pos = _Transform.position;

            _Shockwave = ShockwaveData.Create(
                new float2(pos.x, pos.z),
                0
                );
        }
Exemple #2
0
        public void Execute(int index)
        {
            float cellHeight = Cells[index].Height;
            float factor     = ShockDataExt.DiminishingFactor(Params, deltaTime);

            cellHeight = (factor * cellHeight + Cells[index].AdditionalHeight).ZeroIfSmall();

            Cells[index] = ShockwaveData.Create(
                Cells[index].Position,
                cellHeight,
                Cells[index].WaveTime
                );
        }
Exemple #3
0
        public void OnPressMakeRandomShockwaveCentre()
        {
            if (_Controller != null)
            {
                (float width, float depth) = _Controller.GetSize();

                float x = Random.Range(0f, width);
                float y = Random.Range(0f, depth);

                ShockwaveData centre = ShockwaveData.Create(
                    x, y, _Controller.GetHeightFactor(), 0
                    );
                _Controller.InjectShockwave(centre);
            }
        }