Skip to content

shield/max_shield prevents the shield bar to show itself #25

@cleartocode

Description

@cleartocode

emit_signal("shield_changed", shield/max_shield)

also i came accross with this issue, the following fixed for me:

func set_shield(value):
	if value > max_shield:
		value = max_shield
	shield = value
	emit_signal("shield_changed", shield/max_shield*100)    # multiply by 100
	if shield <= 0:
		self.lives -= 1

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions