Пример #1
0
 public EntityAIMoveTowardsTarget(EntityCreature par1EntityCreature, float par2, float par3)
 {
     TheEntity     = par1EntityCreature;
     Field_48330_f = par2;
     Field_48331_g = par3;
     SetMutexBits(1);
 }
 public EntityAIMoveIndoors(EntityCreature par1EntityCreature)
 {
     InsidePosX = -1;
     InsidePosZ = -1;
     EntityObj  = par1EntityCreature;
     SetMutexBits(1);
 }
Пример #3
0
    public DecomposeCreaturePart(EntityCreature creature, EntityPart part) : base(0.5f)
    {
        _entityParts.Add(new EntityPart(this, part.element));
        _entityParts[0].sortZOffset = 1f;

        _viewAngle = part.viewAngle;
        _decayTime = Random.Range(5f, 10f);

        AttachPhysics(0.25f, 0.5f);

        velocity = CustomMath.HorizontalRotate(creature.velocity, Random.Range(-30f, 30f));
    }
Пример #4
0
    public ThrowableRock(EntityCreature behaviour) : base(0.4f)
    {
        this._behaviour = behaviour;

        _entityParts.Add(new EntityPart(this, "throwablerock"));

        _rockDamage = new Damage(this);

        AttachPhysics(0.2f, 0.4f);

        _decayTime = 5f;
    }
Пример #5
0
    private void OnCollision(Entity entity)
    {
        if (spawned)
        {
            EntityCreature creature = entity as EntityCreature;

            if (creature != null && creature != _owner)
            {
                Explode();
            }
        }
    }
Пример #6
0
    private void OnCollision(Entity entity)
    {
        if (spawned)
        {
            EntityCreature creature = entity as EntityCreature;

            if (creature != null && creature != _owner)
            {
                creature.ApplyDamage(_damage);
                Hit();
            }
        }
    }
Пример #7
0
    private void EffectEntity(Entity entity)
    {
        Vector3 delta = entity.worldPosition - _position;

        if (entity.physics != null)
        {
            entity.physics.AddForce(delta.normalized * _power / delta.magnitude);
        }

        EntityCreature creature = entity as EntityCreature;

        if (creature != null)
        {
            creature.ApplyDamage(new Damage(entity, _power / delta.magnitude));
        }
    }
Пример #8
0
        public BossInterface(EntityCreature owner) : base()
        {
            _owner = owner;

            _bar        = new FSprite("uipixel");
            _bar.scaleY = 8f;

            _barCase = new FSprite("bosshealth");

            _barContainer = new FContainer();
            _barContainer.SetPosition(0f, MenuFlow.screenHeight * 0.5f - 16f);

            _barContainer.AddChild(_bar);
            _barContainer.AddChild(_barCase);

            container.AddChild(_barContainer);
        }
Пример #9
0
        public void InspectTarget(ITarget target)
        {
            EntityCreature creature = target as EntityCreature;

            if (creature != null)
            {
                _inspectLabel.text = string.Concat(creature.name);

                _lastLength = creature.health / creature.maxHealth;

                AddElement(_inspectLabel);
                AddElement(_bar);
                AddElement(_barCase);
            }

            else
            {
                RemoveElement(_inspectLabel);
                RemoveElement(_bar);
                RemoveElement(_barCase);
            }

            _target = creature;
        }
Пример #10
0
 public EntityAIWander(EntityCreature par1EntityCreature, float par2)
 {
     Entity        = par1EntityCreature;
     Field_48317_e = par2;
     SetMutexBits(1);
 }
 public EntityAIRestrictOpenDoor(EntityCreature par1EntityCreature)
 {
     EntityObj = par1EntityCreature;
 }
Пример #12
0
 public EntityAIRestrictSun(EntityCreature par1EntityCreature)
 {
     TheEntity = par1EntityCreature;
 }
Пример #13
0
 public EntityAIMoveTwardsRestriction(EntityCreature par1EntityCreature, float par2)
 {
     TheEntity     = par1EntityCreature;
     Field_48352_e = par2;
     SetMutexBits(1);
 }
 public EntityAIPanic(EntityCreature par1EntityCreature, float par2)
 {
     Field_48316_a = par1EntityCreature;
     Field_48314_b = par2;
     SetMutexBits(1);
 }