Skip to content

Battle/feature - PlayerClass100 test#1435

Draft
tomipir wants to merge 291 commits into
mainfrom
Battle/feature/PlayerClass100Test
Draft

Battle/feature - PlayerClass100 test#1435
tomipir wants to merge 291 commits into
mainfrom
Battle/feature/PlayerClass100Test

Conversation

@tomipir
Copy link
Copy Markdown
Contributor

@tomipir tomipir commented Apr 14, 2026

Player class 100/Desensitizer can now fire a projectile that changes the emotion projectile's (basic battle projectile's) direction to the direction of the desensitizer projectile.

New joystick was added for this, which functions as follows with the Desensitizer class:

  • Pressing closer to the middle of the joystick sends the projectile up
  • Pressing closer to the edge of the joystick sends the projectile to the direction pressed
  • Holding the joystick shows an indicator indicating what direction the projectile will launch to
  • Letting go after holding launches the projectile to the indicated direction

When the projectile hits arena border, soulwall or goal, it is destroyed.

Also Added documentation for new files and updated documentation of many old files that were modified.

BattleCollisionCollider.qtn

  • Added BattleCollisionColliderType enum
    • Added Projectile member
    • Added Diamond member
    • Added PlayerClass100Projectile member
  • Added BattleCollisionColliderQComponent component
    • Added BattleCollisionColliderType type

BattleEvents.qtn

  • Added synced event BattlePlayerClass100AimIndicatorUpdate
    • Added EntityRef ERef field
    • Added bool Show field
    • Added BattlePlayerSlot Slot field
    • Added FPVector2 Direction field
  • Added synced event BattleSpecialJoystickVisibilityChange
    • Added BattlePlayerSlot slot field
    • Added bool Show field

BattlePlayerInput.qtn

  • Added BattleSpecialInput Special field to input
  • Added BattleJoystickState enum
    • Added Up member
    • Added Down member
    • Added Drag member
  • Added BattleSpecialInput struct
    • Added BattleJoystickState JoystickState field
    • Added FPVector2 JoystickValue field

BattlePlayerClass100Data.qtn

  • Added BattlePlayerClass100DataQComponent component
    • Added FPVector2 JoystickValuePrevious field
    • Added bool JoystickDownPrevious field
    • Added FrameTimer JoystickTimer field
    • Added FrameTimer CooldownTimer field

BattlePlayerClass100Projectile.qtn

  • Added BattlePlayerClass100ProjectileQComponent component
    • Added FPVector2 Direction field
    • Added FP Speed field

BattleProjectile.qtn

  • component BattleProjectileQComponent
    • Added EntityRef TriggerEntityRef field
  • Added BattleProjectileTriggerComponent component
    • Added Entityref ProjectileEntityRef field

BattleCollisionQSystem.cs

  • Updated usings
  • Updated OnTrigger2D method to use switch statements

BattlePlayerClassManager.cs

  • Added BattleSpecialInput* specialInput parameter to public virtual unsafe void OnUpdate method
  • Added BattleSpecialInput* specialInput parameter to public static void OnUpdate method

BattlePlayerQSystem.cs

  • Added &input->Special argument to BattlePlayerClassManager.OnUpdate method call in HandleInPlay method

BattlePlayerClassDesensitizer.cs

  • Renamed to BattlePlayerClass100Test.cs
  • Added using Photon.Deterministic
  • Added using System.Threading
  • Added OnUpdate method
  • Added OnDespawn method

BattlePlayerClass100ProjectileQSystem

  • Added public unsafe class BattlePlayerClass100ProjectileQSystem
    • Added public struct filter
      • Added EntityRef EntityRef field
      • Added Transform2D* Transform field
      • Added BattlePlayerClass100ProjectileQComponent* Projectile field
    • Added Create method
    • Added Update method
    • Added OnProjectileHitEmotionProjectile method
    • Added OnProjectileHitObstacle method

BattlePlayerClassProjector.cs

  • Added BattleSpecialInput* specialInput parameter to public override unsafe void OnUpdate method
  • Updated moving projectile to use BattleProjectileQSystem.MoveProjectile method

BattleProjectileQSystem.cs

  • Added public static void MoveProjectile method
  • Added public static void TeleportProjectile method
  • Renamed EntityRef projectileEntity to projectileEntityRef
  • Updated BattleOnGameOver method to use MoveProjectile**

BattleProjectileSpawnerQSystem.cs

  • Public struct Filter
    • Renamed EntityRef Entity to EntityRef
  • Updated SpawnProjectile method to also create the trigger component

BattleGameViewController.cs

  • Added BattleJoystickState state parameter to UiInputOnJoystickMovement method
  • Renamed input parameter to value
  • Added BattleJoystickState state parameter to UiInputOnJOystickRotation method
  • Renamed input parameter to value
  • Added UiInputOnJoystickSpecial method
  • Subscribed to EventBattleSpecialJoystickVisibilityChange evemt
  • Added QEventOnBattleSpecialJoystickVisibilityCHange method

BattlePlayerInput.cs

  • Added using Battle.View.Ui
  • Added BattleJoystickState state parameter to public void OnJoystickMovement method
  • Renamed input parameter to value
  • Added BattleJoystickState state parameter to public void OnJoystickRotation method
  • Renamed input parameter to value
  • Added private field BattleJoystickState _joystickSpecialState
  • Added private field Vector2 _joystickSpecialValue
  • Added public void OnJoystickSpecial method
  • Changed _movementInputType from MovementInputType.FollowPointer to MovementInputType.Joystick in OnEnable method
  • Changed _rotationInputType from RotationInputType.TwoFinger to RotationInputType.Joystick in OnEnable method
  • Added object initializer BattleSpecialInput specialInput to PollInput method
  • Added specialInput field to object initializer Input input in PollInput method

BattlePlayerClass100ViewControllerTest.cs

  • Added public class BattlePlayerClass100ViewControllerTest
  • Added public override void OnUpdateView method
  • Added protected override void OnViewInitOverride method
  • Added private void QEventOnAimIndicatorUpdate method

BattleUiJoystickComponent.cs

  • Added using Quantum
  • Renamed JoyStickInputHandler method to JoystickTwoAxisInputHandler
    • Renamed Vector2 input parameter to value
    • Added BattleJoystickState state parameter
  • Added bool down = false parameter to HandleDrag method

BattleUiJoystickHandler.cs

  • Added using Battle.View.Game
  • Added SerializeField private BattleUiJoystickComponent _specialJoystickComponent
  • Separated public bool IsVisible to:
    • IsMovejoystickVisible
    • IsRotateJoystickVisible
    • IsSpecialJoystickVisible

BattleCollisionTrigger.qtn

  • Added Projectile member to BattleCollisionTriggerType enum

SettingsCarrier.cs

  • Added SpecialJoystick member to BattleUiElementType enum

BattleDiamond.prefab

  • Added QPrototypeBattleCollisionCollidedrQComponent with Diamond type

BattlePlayer100Projectile.prefab

  • Added prefab

BattleQConfig.cs

  • Added public AssetRef BattlePlayerClass100Spec
  • Added public static GetBattlePlayerClass100Spec method

BattlePlayerClass100QSpec

  • Added public class BattlePlayerClass100QSpec
    • Added public AssetRef ProjectileEntityPrototype field
    • Added public FP Speed field
    • Added public FP JoystickTapDurationMax field
    • Added public FP JoystickFlickDistanceMax field
    • Added public FP SpawnDistance field
    • Added public FP Cooldown field

BattleUiJoystickHandler.cs

  • Added SerializeField private BattleUiMovableJoystickElement _specialJoystickMovableElement field
  • Added SerializeField private BattleUiJoystickComponent _specialJoystickComponent field
  • Added public getter SpecialJoystickMovableElement
  • Added BattleUiElementType.SpecialJoystick case to SetShow method
  • Added _specialJoystickMovableElement.SetLocked to SetLocked method
  • Added BattleUiElementType.SpecialJoystick case to SetInfo method
  • Added removing listener from special joystick input in OnDestroy method

31-QuantumBattle.unity

  • Disabled gameobject QuantumDebugRunner

Niklas603619 and others added 30 commits December 9, 2025 16:40
…1110

Fixed the ordering of methods, so all public methods are before private
…hieldTransform #1110

Now matches other methods of the same type
…aced class documentation with a comment and fixed documentation links #1110
… returning and retrieving entities to and from groups #1110

Also updated various documentation
…shields for each character #1110

Also created qtn-BattlePlayerShieldManagerData.dox documentation file
Topi3 and others added 30 commits April 22, 2026 10:44
Updated BattlePlayerQSpec
BattlePlayerCharacterViewController: Fixed documentation
BattleSpriteSheet: Added tooltips to custom property drawer
BattlePlayerClassManager: Updated BattlePlayerClassBase method documentation
BattlePlayerCharacterClassBaseViewController: Added OnShieldHit and OnPlayStateUpdate virtual methods
BattlePlayerCharacterViewController: Added forwards for character hit and PlayStateUpdate events
BattlePlayerShieldClassBaseViewController: Added OnCharacterHit and OnPlayStateUpdate virtual methods
BattlePlayerShieldViewController: Added OnCharacterHit handler method
BattlePlayerShieldViewController: Added a forward for PlayStateUpdate event
Battle/feature - PlayerRefactor

Added a way to use the new spritesheets.
Separated shields into separate Quantum entities.
This was done to allow for detaching a shield and for it's shape and looks to be easily changeable.
A general way to store entities outside the arena was added to make this possible.
This was done in the new BattleEntityManager class.
The player's simulation and view code was refactored in various ways.
BattleViewRegistry was added to be able to reference separate entities on the view side of the code.
A lot of documentation was rewritten.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Battle battleen liittyvät tehtävät Quantum

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Task: Ampumisdemo hahmoluokalle 100

6 participants