示例#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;
        }
示例#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));
            }
        }
示例#3
0
 public virtual void AddDrawObject(Pax4Object p_object)
 {
     if (_draw != null)
     {
         _draw.Add(p_object);
     }
 }
示例#4
0
 public virtual void RemoveDrawObject(Pax4Object p_object)
 {
     if (_draw != null)
     {
         _draw.Remove(p_object);
     }
 }
示例#5
0
 public virtual void RemoveUpdateObject(Pax4Object p_object)
 {
     if (_update != null)
     {
         _update.Remove(p_object);
     }
 }
示例#6
0
 public virtual void AddUpdateObject(Pax4Object p_object)
 {
     if (_update != null)
     {
         _update.Add(p_object);
     }
 }
示例#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);
        }
示例#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);
        }
示例#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);
        }
示例#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);
            }
        }
示例#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();
        }
示例#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);
        }
示例#13
0
 public Pax4ObjectSceneryPartModel(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
 }
 public Pax4ObjectPhysicsPartModel(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
     _boundingSphere.Radius = 1.0f;
 }
示例#15
0
 public virtual void RemoveObject(Pax4Object p_object)
 {
     _update.Remove(p_object);
     _draw.Remove(p_object);
 }
示例#16
0
 public Pax4ObjectPhysicsPartBox(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
 }
示例#17
0
 public Pax4ActorPlayerAmmo(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
     _actorType      = EActorType._PLAYER;
     _actorClassType = EActorType._AMMO;
 }
示例#18
0
 public Pax4ParticleEffectPart(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
 }
示例#19
0
 public Pax4Actor(String p_name, Pax4Object p_parent0)
     : base(p_name, p_parent0)
 {
 }