Ejemplo n.º 1
0
        public Pax4ActorEnemyMonsterLava(String p_name, Pax4Object p_parent0, int p_modelIndex)
            : base(p_name, p_parent0)
        {
            SetScale(_scaleFactor * Vector3.One);

            _actorElementType = EActorType._LAVA;

            SetModel("Model/lavaandiceEnemyLava" + p_modelIndex);

            float scaleFactor = 0.2f;

            _particleEffectAura = new Pax4ParticleEffectPart("_particleEffectAura", this);
            _particleEffectAura.Ini(((Pax4ParticleEffectLavaAndIce)Pax4ParticleEffect._current)._particleEffectLavaMonsterShield);
            _particleEffectAura.SetScale(Vector3.One * scaleFactor);

            _particleEffectAura1 = new Pax4ParticleEffectPart("_particleEffectAura1", this);
            _particleEffectAura1.Ini(((Pax4ParticleEffectLavaAndIce)Pax4ParticleEffect._current)._particleEffectLavaMonsterShield);
            _particleEffectAura1.SetScaleRotation(Vector3.One * scaleFactor, new Vector3(0.0f, (float)Math.PI / 2.0f, 0.0f));

            _particleEffectAura2 = new Pax4ParticleEffectPart("_particleEffectAura2", this);
            _particleEffectAura2.Ini(((Pax4ParticleEffectLavaAndIce)Pax4ParticleEffect._current)._particleEffectLavaMonsterShield);
            _particleEffectAura2.SetScaleRotation(Vector3.One * scaleFactor, new Vector3((float)Math.PI / 2.0f, (float)Math.PI / 2.0f, 0.0f));

            _particleEffectExplosion = new Pax4ParticleEffectPart("_particleEffectExplosion", this);
            _particleEffectExplosion.Ini(((Pax4ParticleEffectLavaAndIce)Pax4ParticleEffect._current)._particleEffectLavaExplosion);

            _current = this;
        }
Ejemplo n.º 2
0
        public static bool NewFactory(PaxIntent p_intent, out PaxState p_state)
        {
            PaxState parent0 = null;

            if (!PaxState._root.TryFindChildState(p_intent, out parent0))
            {
                p_state = null;
                return(false);
            }

            String name = null;
            String type = p_intent._argv["p_type"];

            switch (type)
            {
            case "Pax4Object":
                name    = p_intent._argv["p_name"];
                p_state = new Pax4Object(name, parent0);
                return(true);

            case "Pax4Sprite":
                name    = p_intent._argv["p_name"];
                p_state = new Pax4Sprite(name, parent0);
                return(true);

            case "Pax4Slider":
                name    = p_intent._argv["p_name"];
                p_state = new Pax4Slider(name, parent0);
                return(true);

            default:
                return(PaxState.NewFactory(p_intent, out p_state));
            }
        }
Ejemplo n.º 3
0
 public virtual void AddDrawObject(Pax4Object p_object)
 {
     if (_draw != null)
     {
         _draw.Add(p_object);
     }
 }
Ejemplo n.º 4
0
 public virtual void RemoveDrawObject(Pax4Object p_object)
 {
     if (_draw != null)
     {
         _draw.Remove(p_object);
     }
 }
Ejemplo n.º 5
0
 public virtual void RemoveUpdateObject(Pax4Object p_object)
 {
     if (_update != null)
     {
         _update.Remove(p_object);
     }
 }
Ejemplo n.º 6
0
 public virtual void AddUpdateObject(Pax4Object p_object)
 {
     if (_update != null)
     {
         _update.Add(p_object);
     }
 }
Ejemplo n.º 7
0
        public Pax4ActorEnemyAmmoIce(String p_name, Pax4Object p_parent0, int p_modelIndex)
            : base(p_name, p_parent0)
        {
            _actorElementType = EActorType._ICE;

            SetModel("Model/lavaandiceEnemyIce" + p_modelIndex);

            _particleEffectExplosion = new Pax4ParticleEffectPart("_particleEffectExplosion", this);
            _particleEffectExplosion.Ini(((Pax4ParticleEffectLavaAndIce)Pax4ParticleEffect._current)._particleEffectIceExplosion);
        }
Ejemplo n.º 8
0
        public Pax4ActorEnemyMonster(String p_name, Pax4Object p_parent0)
            : base(p_name, p_parent0)
        {
            _actorType      = EActorType._ENEMY;
            _actorClassType = EActorType._MONSTER;

            _health = _defaultHealth;

            SetMass(_monsterMass);
        }
Ejemplo n.º 9
0
        public Pax4ActorEnemyAmmo(String p_name, Pax4Object p_parent0)
            : base(p_name, p_parent0)
        {
            _actorType      = EActorType._ENEMY;
            _actorClassType = EActorType._AMMO;

            SetScale(_scaleFactor * Vector3.One);

            SetMass(_enemyMass);
        }
Ejemplo n.º 10
0
        public static bool RaycastCallback(RigidBody p_body, JVector p_normal, float p_fraction)
        {
            Pax4Object obj = (Pax4Object)p_body._paxState;

            if (obj._isDisabled)
            {
                return(false);
            }
            else
            {
                return(true);
            }
        }
Ejemplo n.º 11
0
        public Pax4ActorPlayerAmmoIce(String p_name, Pax4Object p_parent0, int p_modelIndex = -1)
            : base(p_name, p_parent0)
        {
            SetScale(_scaleFactor * Vector3.One);

            _actorElementType = EActorType._ICE;

            if (p_modelIndex < 0)
            {
                SetModel("Model/lavaandiceAmmoIce");
            }

            _current = this;
            _wayPointController.SetPhysicsPart(this);

            SetPowerUp(_powerUp);
            _powerUp = EActorPowerUp._NORMAL;

            MoveTo(Vector3.Zero, _prelaunchPosition + Vector3.Down * _scaleFactor * 2.0f);

            Enable();
        }
Ejemplo n.º 12
0
        public Pax4ActorWorld(String p_name, Pax4Object p_parent0)
            : base(p_name, p_parent0)
        {
            float scaleFactor = 11.5f / Pax4Camera._current._scale.Z;

            SetScale(Vector3.One * scaleFactor);
            _worldPosition = Vector3.Backward * -10.0f;

            _current   = null;
            _actorType = EActorType._WORLD;

            _body.Immovable = true;

            if (Pax4ActorPlayerAmmoLava._scaleFactor > Pax4ActorPlayerAmmoIce._scaleFactor)
            {
                _fudgeFactor = Pax4ActorPlayerAmmoLava._scaleFactor / 1.5f;
            }
            else
            {
                _fudgeFactor = Pax4ActorPlayerAmmoIce._scaleFactor / 1.5f;
            }

            _collisionSkin.RemoveAllPrimitives();

            CreatePlanePrimitive(Vector3.Backward, Vector3.Forward * _fudgeFactor, 1.0f, 0.0f, 0.0f);
            CreatePlanePrimitive(Vector3.Forward, Vector3.Backward * _fudgeFactor, 1.0f, 0.0f, 0.0f);

            _fudgeFactor = 36.0f;
            CreatePlanePrimitive(Vector3.Left, Vector3.Right * _fudgeFactor / (3.7f * Pax4Camera._current._scale.Z), 1.0f, 0.0f, 0.0f);
            CreatePlanePrimitive(Vector3.Right, Vector3.Left * _fudgeFactor / (3.7f * Pax4Camera._current._scale.Z), 1.0f, 0.0f, 0.0f);

            _fudgeFactor = 36.0f;
            CreatePlanePrimitive(Vector3.Down, Vector3.Up * _fudgeFactor / 2.2f, 0.4f, 0.5f, 0.5f);
            //CreatePlanePrimitive(Vector3.Up, Vector3.Down * _fudgeFactor / 1.2f, 0.4f, 0.5f, 0.5f);

            SetMass(_worldMass);
        }
Ejemplo n.º 13
0
 public Pax4ObjectSceneryPartModel(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
 }
Ejemplo n.º 14
0
 public Pax4ObjectPhysicsPartModel(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
     _boundingSphere.Radius = 1.0f;
 }
Ejemplo n.º 15
0
 public virtual void RemoveObject(Pax4Object p_object)
 {
     _update.Remove(p_object);
     _draw.Remove(p_object);
 }
Ejemplo n.º 16
0
 public Pax4ObjectPhysicsPartBox(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
 }
Ejemplo n.º 17
0
 public Pax4ActorPlayerAmmo(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
     _actorType      = EActorType._PLAYER;
     _actorClassType = EActorType._AMMO;
 }
Ejemplo n.º 18
0
 public Pax4ParticleEffectPart(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
 }
Ejemplo n.º 19
0
 public Pax4Actor(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
 }