示例#1
0
        public void Update(Entity golfBall, Vector2 impactVelocity, float roughLandResistance)
        {
            bool flag = Main.tileSolid[379];

            Main.tileSolid[379] = false;
            this._positions.Clear();
            this._time           += 0.01666667f;
            this._entity.position = golfBall.position;
            this._entity.width    = golfBall.width;
            this._entity.height   = golfBall.height;
            GolfHelper.HitGolfBall(this._entity, impactVelocity, roughLandResistance);
            this._positions.Add(this._entity.position);
            float angularVelocity = 0.0f;

            for (int index = 0; index < this._iterations; ++index)
            {
                GolfHelper.StepGolfBall(this._entity, ref angularVelocity);
                this._positions.Add(this._entity.position);
            }
            Main.tileSolid[379] = flag;
        }
        public void Update(Entity golfBall, Vector2 impactVelocity, float roughLandResistance)
        {
            bool flag = Main.tileSolid[379];

            Main.tileSolid[379] = false;
            _positions.Clear();
            _time           += 0.0166666675f;
            _entity.position = golfBall.position;
            _entity.width    = golfBall.width;
            _entity.height   = golfBall.height;
            GolfHelper.HitGolfBall(_entity, impactVelocity, roughLandResistance);
            _positions.Add(_entity.position);
            float angularVelocity = 0f;

            for (int i = 0; i < _iterations; i++)
            {
                GolfHelper.StepGolfBall(_entity, angularVelocity);
                _positions.Add(_entity.position);
            }
            Main.tileSolid[379] = flag;
        }