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); }
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)); }
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; }
private void OnCollision(Entity entity) { if (spawned) { EntityCreature creature = entity as EntityCreature; if (creature != null && creature != _owner) { Explode(); } } }
private void OnCollision(Entity entity) { if (spawned) { EntityCreature creature = entity as EntityCreature; if (creature != null && creature != _owner) { creature.ApplyDamage(_damage); Hit(); } } }
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)); } }
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); }
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; }
public EntityAIWander(EntityCreature par1EntityCreature, float par2) { Entity = par1EntityCreature; Field_48317_e = par2; SetMutexBits(1); }
public EntityAIRestrictOpenDoor(EntityCreature par1EntityCreature) { EntityObj = par1EntityCreature; }
public EntityAIRestrictSun(EntityCreature par1EntityCreature) { TheEntity = par1EntityCreature; }
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); }