mirror of
https://github.com/RDCN-Community-Developers/rdkt.git
synced 2026-09-05 01:35:31 +08:00
Added MoveCameraEvent.
This commit is contained in:
@@ -54,6 +54,7 @@ public data class Vector2(val x: Double, val y: Double) {
|
||||
public companion object {
|
||||
public val ZERO: Vector2 = Vector2(0.0, 0.0)
|
||||
public val ONE: Vector2 = Vector2(1.0, 1.0)
|
||||
public val CENTER: Vector2 = Vector2(50.0, 50.0)
|
||||
}
|
||||
|
||||
public object Serializer :
|
||||
|
||||
@@ -0,0 +1,25 @@
|
||||
package cn.rdlevel.rdkt.core.events
|
||||
|
||||
|
||||
import cn.rdlevel.rdkt.core.data.*
|
||||
import kotlinx.serialization.SerialName
|
||||
import kotlinx.serialization.Serializable
|
||||
|
||||
/**
|
||||
* Moves, zooms, or rotates the camera of the specific rooms.
|
||||
* @property cameraPosition The new position of the camera.
|
||||
* @property zoom The new zoom level of the camera.
|
||||
* @property angle The new rotation angle of the camera clockwise.
|
||||
* @property real Whether to use the camera in the real view. Usually this affects the visibility of contents outside the original view.
|
||||
*/
|
||||
@Serializable
|
||||
@SerialName("MoveCamera")
|
||||
public data class MoveCameraEvent(
|
||||
var cameraPosition: Vector2? = Vector2.CENTER,
|
||||
var zoom: Int? = 100,
|
||||
var angle: Double? = 0.0,
|
||||
override var duration: Double = 1.0,
|
||||
override var ease: Easing = Easing.LINEAR,
|
||||
var real: Boolean = false,
|
||||
override var rooms: RoomsOrTopLayer = roomsOf(ROOM1),
|
||||
) : ActionEvent(), MutableRoomsOrTopLayerSpecificEvent, DurationEaseSpecificEvent
|
||||
Reference in New Issue
Block a user