Colobot
Loading...
Searching...
No Matches
CBaseAlien Class Reference

Base class for all aliens. More...

#include <src/object/subclass/base_alien.h>

Inheritance diagram for CBaseAlien:

Public Member Functions

 CBaseAlien (int id, ObjectType type)
void SetFixed (bool fixed)
 Management of "temporarirly stationary" mode (alien on the back).
bool GetFixed ()
void Write (CLevelParserLine *line) override
 Writes object properties to line in level file.
void Read (CLevelParserLine *line) override
 Reads object properties from line in level file.
Public Member Functions inherited from CBaseVehicle
 CBaseVehicle (int id, ObjectType type)
Public Member Functions inherited from COldObject
 COldObject (int id)
void Simplify () override
bool DamageObject (DamageType type, float force=std::numeric_limits< float >::infinity(), CObject *killer=nullptr) override
 Damage the object, with the given force. Returns true if the object has been fully destroyed (assuming the object is destroyable, of course). If force == infinity, destroy immediately (this is the default value).
void DestroyObject (DestructionType type, CObject *killer=nullptr) override
 Destroy the object immediately. Use this only if you are 100% sure this is what you want, because object with magnifyDamage=0 should be able to bypass all damage. It's recommended to use CDamageableObject::DamageObject() instead.
bool EventProcess (const Event &event) override
void UpdateMapping ()
void DeletePart (int part) override
void SetObjectRank (int part, int objRank)
int GetObjectRank (int part) override
void SetObjectParent (int part, int parent)
void SetType (ObjectType type) override
const char * GetName ()
int GetOption () override
void Write (CLevelParserLine *line) override
 Writes object properties to line in level file.
void Read (CLevelParserLine *line) override
 Reads object properties from line in level file.
void SetDrawFront (bool bDraw) override
int GetShadowLight ()
void SetFloorHeight (float height)
void FloorAdjust () override
void SetLinVibration (Math::Vector dir) override
Math::Vector GetLinVibration ()
void SetCirVibration (Math::Vector dir) override
Math::Vector GetCirVibration ()
void SetTilt (Math::Vector dir)
Math::Vector GetTilt () override
void SetPartPosition (int part, const Math::Vector &pos)
Math::Vector GetPartPosition (int part) const
void SetPartRotation (int part, const Math::Vector &angle)
Math::Vector GetPartRotation (int part) const
void SetPartRotationY (int part, float angle)
void SetPartRotationX (int part, float angle)
void SetPartRotationZ (int part, float angle)
float GetPartRotationY (int part)
float GetPartRotationX (int part)
float GetPartRotationZ (int part)
void SetPartScale (int part, float zoom)
void SetPartScale (int part, Math::Vector zoom)
Math::Vector GetPartScale (int part) const
void SetPartScaleX (int part, float zoom)
float GetPartScaleX (int part)
void SetPartScaleY (int part, float zoom)
float GetPartScaleY (int part)
void SetPartScaleZ (int part, float zoom)
float GetPartScaleZ (int part)
void SetTrainer (bool bEnable) override
 Disables remote control of an object (only programming allowed).
bool GetTrainer () override
 Checks if remote control is disabled.
bool GetPlusTrainer ()
void SetToy (bool bEnable)
bool GetToy ()
void SetManual (bool bManual)
bool GetManual ()
void SetMasterParticle (int part, int parti) override
void SetTransporter (CObject *transporter) override
 Set transporter object that transports this object.
CObjectGetTransporter () override
 Return transported object.
void SetTransporterPart (int part) override
Math::MatrixGetRotateMatrix (int part)
Math::MatrixGetWorldMatrix (int part) override
void AdjustCamera (Math::Vector &eye, float &dirH, float &dirV, Math::Vector &lookat, Math::Vector &upVec, Gfx::CameraType type) override
 Adjust camera parameters for the given object.
CharacterGetCharacter () override
float GetAbsTime ()
float GetCapacity () override
 Return capacity of this power container.
bool IsRechargeable () override
 Returns true if this power container can be recharged.
void SetShield (float level) override
 Set shield level.
float GetShield () override
 Get shield level.
void SetRange (float delay) override
 Sets jet engine heating speed (bigger = slower, 0 for infinite).
float GetRange () override
 Returns jet engine heating speed (bigger = slower, 0 for infinite).
void SetReactorRange (float reactorRange) override
 Sets current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot).
float GetReactorRange () override
 Returns current jet engine heat level (this is actually how much is left before it overheats, so smaller = more hot).
void SetTransparency (float value) override
 Sets the transparency of object.
Math::Sphere GetJostlingSphere () const override
bool JostleObject (float force) override
void SetVirusMode (bool bEnable) override
bool GetVirusMode () override
void SetCameraType (Gfx::CameraType type) override
 Set camera type for this object.
Gfx::CameraType GetCameraType () override
 Return camera type for this object.
void SetCameraLock (bool lock) override
 Disallow camera changes.
bool GetCameraLock () override
 Check if camera changes are disallowed.
void SetHighlight (bool highlight) override
 Highlights the object on mouse over.
void SetSelect (bool select, bool bDisplayError=true) override
 Selects the object.
bool GetSelect () override
 Checks if the object is selected.
void SetSelectable (bool bMode)
bool GetSelectable () override
 Returns true if the object is selectable.
void SetUnderground (bool underground)
void SetCheckToken (bool bMode)
bool GetCheckToken ()
void SetMagnifyDamage (float factor) override
 Set damage multiplier for the object (bigger = more damage, weaker shield).
float GetMagnifyDamage () override
 Return damage multiplier for the object (bigger = more damage, weaker shield).
void SetDamaging (bool damaging) override
 Set the status that means the object is currently taking damage.
bool IsDamaging () override
 Is object currently taking damage?
void SetDying (DeathType deathType) override
 Set the status that means the object is currently dying.
DeathType GetDying () override
 Return object death type.
bool IsDying () override
 Is object currently dying?
bool GetActive () override
 Is this object active (not dead)?
bool GetDetectable () override
 Is this object detectable (not dead and not underground)?
void SetGunGoalV (float gunGoal)
void SetGunGoalH (float gunGoal)
float GetGunGoalV ()
float GetGunGoalH ()
float GetShowLimitRadius () override
 Return object operation radius for display after clicking UI button.
void CreateSelectParticle ()
CPhysicsGetPhysics () override
 Returns CPhysics instance associated with this object. If the object implements Movable interface, and type != OBJECT_TOTO, this can be assumed to be != nullptr.
CMotionGetMotion () override
 Returns CMotion instance associated with this object. If the object implements Movable interface, this can be assumed to be != nullptr.
CAutoGetAuto () override
bool CreateShadowCircle (float radius, float intensity, Gfx::EngineShadowType type=Gfx::ENG_SHADOW_NORM)
bool CreateShadowLight (float height, Gfx::Color color)
void FlatParent () override
void SetPosition (const Math::Vector &pos) override
 Sets object's position.
Math::Vector GetPosition () const override
 Returns object's position.
void SetRotation (const Math::Vector &rotation) override
 Sets object's rotation (Euler angles).
Math::Vector GetRotation () const override
 Returns object's rotation (Euler angles).
void SetScale (const Math::Vector &scale) override
 Sets objects's scale.
Math::Vector GetScale () const override
 Returns object's scale.
void UpdateInterface () override
 Updates all interface controls.
void StopProgram () override
 Stop currently running program.
bool GetTraceDown () override
 Is the pencil down?
void SetTraceDown (bool down) override
 Put the drawing pencil down.
TraceColor GetTraceColor () override
 Return color of the trace.
void SetTraceColor (TraceColor color) override
 Set color of the trace.
float GetTraceWidth () override
 Return trace width.
void SetTraceWidth (float width) override
 Set trace width.
bool IsRepairable () override
 Returns true if this object can be repaired in RepairStation.
float GetShieldFullRegenTime () override
 Return time (in seconds) required for full shield regeneration.
float GetLightningHitProbability () override
 Returns the distance modifier for CLightning, used to modify hit probability. Value in range [0..1], where 0 is never and 1 is normal probability.
void SetBulletWall (bool bulletWall)
bool IsBulletWall () override
int MapPseudoSlot (Pseudoslot pseudoslot) override
 Given one of the PSEUDOSLOT enums, returns real slot number, or -1 if specified pseudoslot is not present in this object.
int GetNumSlots () override
 Get number of slots. Valid slot numbers are 0 up to GetNumSlots()-1. Using invalid slot numbers in the other functions will crash the game.
Math::Vector GetSlotPosition (int slotNum) override
 Get relative position of a slot.
float GetSlotAngle (int slotNum) override
 Get relative angle (in radians) where robot should be positioned when inserting into a slot.
float GetSlotAcceptanceAngle (int slotNum) override
 Get the maximum angular distance from the ideal angle (in radians) where robot should be positioned when inserting into a slot.
CObjectGetSlotContainedObject (int slotNum) override
 Get object contained in a slot.
void SetSlotContainedObject (int slotNum, CObject *object) override
 Set object contained in a slot.
void SetPowerPosition (const Math::Vector &powerPosition)
void SetScale (float scale)
 Sets objects's scale (uniform value).
Public Member Functions inherited from CObject
 CObject (const CObject &)=delete
CObjectoperator= (const CObject &)=delete
ObjectType GetType () const
 Returns object type.
int GetID () const
 Returns object's unique id.
bool Implements (ObjectInterfaceType type) const
 Check if object implements the given type of interface.
void SetScale (float scale)
 Sets objects's scale (uniform value).