add alfa dash

main
Wolfapredator 2 years ago
parent 8e389f6ebe
commit 0845c937d2

@ -12,7 +12,6 @@ GameObject:
- component: {fileID: -1245246880709607504}
- component: {fileID: 1869328876048651242}
- component: {fileID: 6928314019862592818}
- component: {fileID: 7670494420161702126}
- component: {fileID: 8006533844287318960}
m_Layer: 0
m_Name: PawWeapon
@ -74,7 +73,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
RaycastOriginOffset: {x: 0, y: 0, z: 0}
LaserOriginOffset: {x: 0, y: 0, z: 0}
LaserMaxDistance: 50
LaserMaxDistance: 5
LaserCollisionMask:
serializedVersion: 2
m_Bits: 264448
@ -178,6 +177,7 @@ MonoBehaviour:
RecoilStyle: 2
Delay: 0
RecoilFeedback: {fileID: 0}
forceMultiplayer: 50
DamageAreaShape: 0
AreaSize: {x: 1, y: 1}
AreaOffset: {x: 1, y: 0}
@ -190,116 +190,7 @@ MonoBehaviour:
Knockback: 0
KnockbackForce: {x: 10, y: 2}
InvincibilityDuration: 0.5
--- !u!114 &7670494420161702126
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 255961520152165634}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a557e2b93323f4831a62221b200348c4, type: 3}
m_Name:
m_EditorClassIdentifier:
TriggerMode: 1
DelayBeforeUse: 0
DelayBeforeUseReleaseInterruption: 1
TimeBetweenUses: 1
TimeBetweenUsesReleaseInterruption: 1
Interruptable: 0
InitializeOnStart: 0
MagazineBased: 0
MagazineSize: 30
AutoReload: 0
ReloadTime: 2
AmmoConsumedPerShot: 1
AutoDestroyWhenEmpty: 0
AutoDestroyWhenEmptyDelay: 1
CurrentAmmoLoaded: 0
WeaponAttachmentOffset: {x: 0, y: 0, z: 0}
FlipWeaponOnCharacterFlip: 1
FlipValue: {x: -1, y: 1, z: 1}
LeftHandHandle: {fileID: 0}
RightHandHandle: {fileID: 0}
ModifyMovementWhileEquipped: 0
PermanentMovementMultiplier: 0
ModifyMovementWhileAttacking: 0
MovementMultiplier: 0
PreventHorizontalMovementWhileInUse: 0
SetForceWhileInUse: 0
ForceWhileInUse: {x: 0, y: 0}
Animators: []
EquippedAnimationParameter:
IdleAnimationParameter:
StartAnimationParameter:
DelayBeforeUseAnimationParameter:
SingleUseAnimationParameter:
UseAnimationParameter:
DelayBetweenUsesAnimationParameter:
StopAnimationParameter:
ReloadStartAnimationParameter:
ReloadAnimationParameter:
ReloadStopAnimationParameter:
WeaponAngleAnimationParameter:
WeaponAngleRelativeAnimationParameter:
WeaponStartMMFeedback: {fileID: 0}
WeaponUsedMMFeedback: {fileID: 0}
WeaponStopMMFeedback: {fileID: 0}
WeaponReloadMMFeedback: {fileID: 0}
WeaponReloadNeededMMFeedback: {fileID: 0}
WeaponOnHitFeedback: {fileID: 0}
WeaponOnMissFeedback: {fileID: 0}
WeaponOnHitDamageableFeedback: {fileID: 0}
WeaponOnHitNonDamageableFeedback: {fileID: 0}
WeaponOnKillFeedback: {fileID: 0}
ApplyRecoilOnUse: 0
RecoilOnUseProperties:
RecoilForceGrounded: 10
RecoilForceAirborne: 10
RecoilStyle: 2
Delay: 0
RecoilFeedback: {fileID: 0}
ApplyRecoilOnHitDamageable: 0
RecoilOnHitDamageableProperties:
RecoilForceGrounded: 10
RecoilForceAirborne: 10
RecoilStyle: 2
Delay: 0
RecoilFeedback: {fileID: 0}
ApplyRecoilOnHitNonDamageable: 0
RecoilOnHitNonDamageableProperties:
RecoilForceGrounded: 10
RecoilForceAirborne: 10
RecoilStyle: 2
Delay: 0
RecoilFeedback: {fileID: 0}
ApplyRecoilOnMiss: 0
RecoilOnMissProperties:
RecoilForceGrounded: 10
RecoilForceAirborne: 10
RecoilStyle: 2
Delay: 0
RecoilFeedback: {fileID: 0}
ApplyRecoilOnKill: 0
RecoilOnKillProperties:
RecoilForceGrounded: 10
RecoilForceAirborne: 10
RecoilStyle: 2
Delay: 0
RecoilFeedback: {fileID: 0}
DamageAreaShape: 0
AreaSize: {x: 1, y: 1}
AreaOffset: {x: 1, y: 0}
InitialDelay: 0
ActiveDuration: 1
TargetLayerMask:
serializedVersion: 2
m_Bits: 0
DamageCaused: 10
Knockback: 0
KnockbackForce: {x: 10, y: 2}
InvincibilityDuration: 0.5
laser: {fileID: 0}
--- !u!114 &8006533844287318960
MonoBehaviour:
m_ObjectHideFlags: 0
@ -317,10 +208,10 @@ MonoBehaviour:
WeaponRotationSpeed: 1
MinimumAngle: -180
MaximumAngle: 180
Reticle: {fileID: 0}
Reticle: {fileID: 1000010525066036, guid: fdff91f9c641e4bc4ae800f161c07e1f, type: 3}
DisplayReticle: 1
ReticleDistance: 0
ReticleAtMousePosition: 0
ReticleDistance: 50
ReticleAtMousePosition: 1
RotateReticle: 0
ReplaceMousePointer: 1
DisableReticleOnDeath: 1

@ -178,8 +178,8 @@ namespace MoreMountains.CorgiEngine
_damageAreaCollider.enabled = true;
}
private void Update()
{
private void FixedUpdate()
{
Vector3 _mousePos = Input.mousePosition;
Vector3 direction = _mousePos - Owner.transform.position;
@ -191,7 +191,8 @@ namespace MoreMountains.CorgiEngine
if (Input.GetMouseButtonUp(0))
{
Vector2 newpose = Input.mousePosition;
_controller.AddForce((newpose - mouseStartpos).normalized * forceMultiplayer);
Debug.LogError((newpose - mouseStartpos).normalized * forceMultiplayer);
_controller.SetForce((newpose - mouseStartpos).normalized * forceMultiplayer);
}
}

Loading…
Cancel
Save