Class SetCamAction


  • public class SetCamAction
    extends Action
    Action to move the players cam. This action is restricted for the creative mode.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      Vec3 focus
      Center position of cam, at witch the cam looks at.
      Vec2 orbit
      Rotation of the cam around the center.
      float radius
      Distance to the center point.
    • Constructor Summary

      Constructors 
      Constructor Description
      SetCamAction​(Vec3 focus, Vec2 orbit, float radius)
      Create a action to move the player cam.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String getName()
      Name of the action in the json package.
      boolean isLimited()
      Returns true if the action is limited in challenge mode, by the action cap.
      java.lang.Object serializeData()
      Serializes the data of the Action.
      • Methods inherited from class page.codeberg.terratactician_expandoria.bots.actions.Action

        serialize
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Field Detail

      • focus

        public Vec3 focus
        Center position of cam, at witch the cam looks at.
      • orbit

        public Vec2 orbit
        Rotation of the cam around the center. (orientation, height) Angle is in radiants.
      • radius

        public float radius
        Distance to the center point.
    • Constructor Detail

      • SetCamAction

        public SetCamAction​(Vec3 focus,
                            Vec2 orbit,
                            float radius)
        Create a action to move the player cam. This action does only work in creative mode.
        Parameters:
        focus - center of the pan orbit cam
        orbit - direction of the pan orbit
        radius - radius to the center of pan orbit cam
    • Method Detail

      • getName

        public java.lang.String getName()
        Description copied from class: Action
        Name of the action in the json package.
        Specified by:
        getName in class Action
        Returns:
        API name of this Action
      • serializeData

        public java.lang.Object serializeData()
        Description copied from class: Action
        Serializes the data of the Action. This may returns a JSONObject or String or an other supported datatype.
        Specified by:
        serializeData in class Action
        Returns:
        JSONObject or String
      • isLimited

        public boolean isLimited()
        Description copied from class: Action
        Returns true if the action is limited in challenge mode, by the action cap.
        Specified by:
        isLimited in class Action
        Returns:
        if is limited