Gives an opportunity of moving of the player between maps. When the player gets in this region game loads a new map.
Inheritance: Engine.Region
Beispiel #1
0
        public ChangeMapInformation GetChangeMapInformation(MapChangeRegion region)
        {
            ChangeMapInformation information = new ChangeMapInformation();

            information.position      = (OldPosition - region.Position) * region.Rotation.GetInverse();
            information.lookDirection = ((PlayerIntellect)Intellect).LookDirection *
                                        region.Rotation.GetInverse();
            information.velocity = MainBody.LinearVelocity * region.Rotation.GetInverse();

            information.life = Life;

            information.weapons           = weapons;
            information.activeWeaponIndex = GetWeaponIndex(
                (activeWeapon != null) ? activeWeapon.Type : null);

            return(information);
        }
        public ChangeMapInformation GetChangeMapInformation( MapChangeRegion region )
        {
            ChangeMapInformation information = new ChangeMapInformation();

            information.position = ( OldPosition - region.Position ) * region.Rotation.GetInverse();
            information.lookDirection = ( (PlayerIntellect)Intellect ).LookDirection *
                region.Rotation.GetInverse();
            information.velocity = MainBody.LinearVelocity * region.Rotation.GetInverse();

            information.life = Life;

            information.weapons = weapons;
            information.activeWeaponIndex = GetWeaponIndex(
                ( activeWeapon != null ) ? activeWeapon.Type : null );

            return information;
        }