Пример #1
0
        public DustParticle(Vector3 _position, DustParticleGenerator _home)
            : base("Textures/DustParticleTexture", _position)
        {
            home = _home;

            Random random = new Random((int)(_position.X + _position.Y + _position.Z));

            Scale = 0.1f;
        }
Пример #2
0
        private float zSpeed = 20.0f; // The speed the ship is moving at

        #endregion Fields

        #region Constructors

        public Fighter(long _uniqueId, Vector3 _position, Quaternion _rotation, Team _team, SpawnShip _home)
            : base(_uniqueId, _position, _rotation, _team)
        {
            myAI = new AI(this);

            SHIELD_RECOVER_RATE /= 5;

            Damage = 0.5f;

            MAX_HEALTH = 5;
            Health = MaxHealth;

            MAX_SHIELDS = 5;
            Shields = MaxShields;

            PRIMARY_RANGE   = 1000000f;
            SECONDARY_RANGE = 800000f;

            INTEREST_TIME = 20;
            interestTimer = INTEREST_TIME;

            maxJitterPosition = new Vector3(0.5f, 0.5f, 0.5f);
            minJitterPosition = -maxJitterPosition;

            maxJitterRotation = Quaternion.Identity;
            minJitterRotation = maxJitterRotation;

            maxJitterPositionVelocity = new Vector3(0.5f, 0.5f, 0.5f);
            minJitterPositionVelocity = -maxJitterPositionVelocity;

            maxJitterRotationVelocity = Quaternion.Identity;
            minJitterRotationVelocity = maxJitterRotationVelocity;

            home = _home;

            random = new Random((int)_uniqueId);

            dustGenerator = new DustParticleGenerator(this);
            trailGenerators = new List<EngineTrailParticleGenerator>();
            Active = false;
        }
 public DustParticle createDustParticle(Vector3 _position, DustParticleGenerator _home)
 {
     return new DustParticle(_position, _home);
 }