mirror of
https://github.com/curioustorvald/Terrarum.git
synced 2026-06-12 19:44:05 +09:00
49 lines
1.1 KiB
Kotlin
49 lines
1.1 KiB
Kotlin
package net.torvald.terrarum.gameactors
|
|
|
|
import net.torvald.gdx.graphics.Cvec
|
|
|
|
/**
|
|
* Lightbox is defined based on pixelwise position in the world!
|
|
*/
|
|
class Lightbox() {
|
|
var hitbox: Hitbox = Hitbox(0.0,0.0,0.0,0.0)
|
|
var light: Cvec = Cvec()
|
|
|
|
constructor(hitbox: Hitbox, light: Cvec) : this() {
|
|
this.hitbox = hitbox
|
|
this.light = light
|
|
}
|
|
|
|
operator fun component1() = hitbox
|
|
operator fun component2() = light
|
|
}
|
|
|
|
/**
|
|
* For actors that either emits or blocks lights
|
|
*
|
|
* Created by minjaesong on 2016-02-19.
|
|
*
|
|
* the interface Luminous is merged with the ActorWithBody -- minjaesong on 2022-09-11
|
|
*/
|
|
/*interface Luminous {
|
|
|
|
/**
|
|
* Arguments:
|
|
*
|
|
* Hitbox(x-offset, y-offset, width, height)
|
|
* (Use ArrayList for normal circumstances)
|
|
*
|
|
* NOTE: MUST NOT SERIALISE (use `@Transient`)
|
|
*/
|
|
val lightBoxList: List<Lightbox>
|
|
|
|
/**
|
|
* Arguments:
|
|
*
|
|
* Hitbox(x-offset, y-offset, width, height)
|
|
* (Use ArrayList for normal circumstances)
|
|
*
|
|
* NOTE: MUST NOT SERIALISE (use `@Transient`)
|
|
*/
|
|
val shadeBoxList: List<Lightbox>
|
|
}*/ |