Skip to content

BaseProjectile

In: res://projectile/BaseProjectile.gd

Inherits: BaseObj > BaseProjectile

Description

Base class used for projectiles. This file mostly defines properties to be used by projectile state scripts, such as DefaultFireball.

Properties

Property Default Value Description
immunity_susceptible true N/A

deletes_other_projectiles

true Whether or not the projectile deletes other projectiles that collide with it.

Enumerations

There are no enumerated types for this class.

Constants

There are no constants for this class.

Methods

disable()

Removes the projectile from play. Note that this doesn't actually delete the projectile, but disables the sprite, hitboxes, and particles, rendering the projectile invisible and unable to interact with other objects.

returns null

Signals

There are no signals for this class.

Credits

Info contributed by xColdxFusionx

Source

BaseProjectile.gd
extends BaseObj

class_name BaseProjectile

export  var immunity_susceptible = true
export  var deletes_other_projectiles = true

func disable():
    sprite.hide()
    disabled = true
    for hitbox in get_active_hitboxes():
        hitbox.deactivate()
    stop_particles()