Changes / gameloop almost ready
This commit is contained in:
@@ -100,12 +100,10 @@ FOVScale=0.011110
|
||||
DoubleClickTime=0.200000
|
||||
+ActionMappings=(ActionName="Grab_R",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Right_Trigger_Click)
|
||||
+ActionMappings=(ActionName="Grab_L",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Left_Trigger_Click)
|
||||
+ActionMappings=(ActionName="Laser_R",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Right_Grip_Click)
|
||||
+ActionMappings=(ActionName="Laser_R",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Right_B_Click)
|
||||
+ActionMappings=(ActionName="Use_R",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Right_A_Click)
|
||||
+ActionMappings=(ActionName="Use_L",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Left_X_Click)
|
||||
+ActionMappings=(ActionName="Laser_L",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Left_Grip_Click)
|
||||
+ActionMappings=(ActionName="Menu_R",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Right_B_Click)
|
||||
+ActionMappings=(ActionName="Menu_L",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Left_Y_Click)
|
||||
+ActionMappings=(ActionName="Laser_L",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=OculusTouch_Left_Y_Click)
|
||||
+AxisMappings=(AxisName="TriggerR",Scale=1.000000,Key=OculusTouch_Right_Trigger_Axis)
|
||||
+AxisMappings=(AxisName="TriggerL",Scale=1.000000,Key=OculusTouch_Left_Trigger_Axis)
|
||||
+AxisMappings=(AxisName="ScrollR",Scale=1.000000,Key=OculusTouch_Right_Thumbstick_Y)
|
||||
|
||||
Binary file not shown.
Binary file not shown.
BIN
Content/Assets/Blocks/SM_Block_HitAfterglow.uasset
Normal file
BIN
Content/Assets/Blocks/SM_Block_HitAfterglow.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Materials/M_Block.uasset
Normal file
BIN
Content/Materials/M_Block.uasset
Normal file
Binary file not shown.
BIN
Content/Materials/M_BlockHit.uasset
Normal file
BIN
Content/Materials/M_BlockHit.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
BIN
Content/Textures/T_Afterglow.uasset
Normal file
BIN
Content/Textures/T_Afterglow.uasset
Normal file
Binary file not shown.
Binary file not shown.
Binary file not shown.
@@ -14,9 +14,9 @@ ABuildingBlock::ABuildingBlock()
|
||||
}
|
||||
|
||||
void ABuildingBlock::DepleteHealth(float Amount) {
|
||||
Health =- Amount;
|
||||
|
||||
if (Health <= 0.f) {
|
||||
Health = Health - Amount;
|
||||
if (Health <= 0.0f) {
|
||||
UE_LOG(LogTemp, Warning, TEXT("Health below 0 - DestroyingBlock"));
|
||||
DestroyBlock();
|
||||
}
|
||||
else {
|
||||
|
||||
@@ -15,11 +15,11 @@ public:
|
||||
// Sets default values for this actor's properties
|
||||
ABuildingBlock();
|
||||
|
||||
UPROPERTY(EditDefaultsOnly)
|
||||
UPROPERTY(EditDefaultsOnly, BlueprintReadWrite)
|
||||
UStaticMeshComponent* StaticMesh;
|
||||
|
||||
UPROPERTY(BlueprintReadWrite)
|
||||
float Health = 100;
|
||||
UPROPERTY(BlueprintReadWrite, EditAnywhere)
|
||||
float Health = 100.0f;
|
||||
|
||||
UPROPERTY(BlueprintReadOnly)
|
||||
float InitialHealth;
|
||||
|
||||
@@ -268,9 +268,11 @@ void AFireworksPawn::DisableLaserOnHand(EControllerHand Hand)
|
||||
if (Hand == EControllerHand::Left)
|
||||
{
|
||||
TryShowLaserL = false;
|
||||
LaserL->SetHiddenInGame(true);
|
||||
}
|
||||
else {
|
||||
TryShowLaserR = false;
|
||||
LaserR->SetHiddenInGame(true);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -278,9 +280,6 @@ void AFireworksPawn::DisableLaserOnHand(EControllerHand Hand)
|
||||
void AFireworksPawn::TryUpdateLasers()
|
||||
{
|
||||
// --- Left Hand ---
|
||||
|
||||
// Check if this hand is grabbing anything, if not - continue
|
||||
if (!IsGrabbingL) {
|
||||
if (TryShowLaserL)
|
||||
{
|
||||
FVector StartLocation = LaserL->GetComponentLocation();
|
||||
@@ -288,17 +287,9 @@ void AFireworksPawn::TryUpdateLasers()
|
||||
GetWorld()->LineTraceSingleByChannel(CurrentLaserHitL, StartLocation, EndLocation, ECollisionChannel::ECC_Visibility);
|
||||
LaserL->SetHiddenInGame(false);
|
||||
LaserL->SetRelativeScale3D(FVector((CurrentLaserHitL.Distance >= 5.0f ? CurrentLaserHitL.Distance : 1000.0f), LaserL->GetRelativeScale3D().Y, LaserL->GetRelativeScale3D().Z));
|
||||
} // If the laser is visible, and should not - hide it
|
||||
else if(!LaserL->bHiddenInGame)
|
||||
{
|
||||
LaserL->SetHiddenInGame(true);
|
||||
}
|
||||
}
|
||||
|
||||
// --- Right Hand ---
|
||||
|
||||
// Check if this hand is grabbing anything, if not - continue
|
||||
if (!IsGrabbingR) {
|
||||
if (TryShowLaserR)
|
||||
{
|
||||
FVector StartLocation = LaserR->GetComponentLocation();
|
||||
@@ -306,10 +297,5 @@ void AFireworksPawn::TryUpdateLasers()
|
||||
GetWorld()->LineTraceSingleByChannel(CurrentLaserHitR, StartLocation, EndLocation, ECollisionChannel::ECC_Visibility);
|
||||
LaserR->SetHiddenInGame(false);
|
||||
LaserR->SetRelativeScale3D(FVector((CurrentLaserHitR.Distance >= 5.0f ? CurrentLaserHitR.Distance : 1000.0f), LaserR->GetRelativeScale3D().Y, LaserR->GetRelativeScale3D().Z));
|
||||
} // If the laser is visible, and should not - hide it
|
||||
else if (!LaserR->bHiddenInGame)
|
||||
{
|
||||
LaserR->SetHiddenInGame(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user