Skip to content

Commit

Permalink
Merge pull request #56 from yxue5/DevelopNew
Browse files Browse the repository at this point in the history
Alpha Release 1.1
  • Loading branch information
yxue5 authored Apr 4, 2018
2 parents f05a48f + f78ee52 commit 6abf308
Show file tree
Hide file tree
Showing 27 changed files with 280 additions and 102 deletions.
27 changes: 27 additions & 0 deletions Meeting Minutes/Meeting Minutes.txt
Original file line number Diff line number Diff line change
Expand Up @@ -68,3 +68,30 @@ Jin Lin
Summery:
Last week, Xinyu has worked on the game map and made the gear and gearboard rotate, but has the problem with the rotate direction of gearboard. Jie has worked on the FK/IK animation and have problem with finding the right class for IK animated pawn class. Yang was still work on damage.
Before the next meeting, Jie should finish the FK/IK animation and Xinyu should add the material on the ship and fix the problem. Yang is going to fix the damage for collision problem.



Date: 3/27/2018
Time: 4:00 - 5:00

Attend Member:
Xinyu Chen
Yang Xue
Jin Lin

Summary:
Last week, Jie complete the FK/IK animation and Xinyu complete the ShipMap animation and material, Yang add damage UI, animation sound and dash animation.
This week, we need to submit the Alpha Release by Wednesday and Xinyu and Jie need to finished writing the project document,Yang need to finish the AI part.


Date: 4/3/2018
Time: 4:00 - 5:00

Attend Member:
Xinyu Chen
Yang Xue
Jin Lin

Summary:
Last week, Jie was assigned to fix the main menu problem where main menu game mode can not commect with BP_EroicaGameMode. Xinyu was assigned to fix the passable gearboard which is to make gearboard both passable and not push back the character.The GearBoard can rotate now, but the character could stay on the board while the board rotate down. Yang programmed the AI to make AI was able to follow the player and hit the player while AI come close enough to the player.
This Week, Jie and Xinyu should fix the bug by Wednesday. Yang is going to fix the AI to hit the character no matter where it is and implement the dead state while character's HP hits to 0.
5 changes: 4 additions & 1 deletion ProjectEroica/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -84,4 +84,7 @@ Content/Art_Assets/*
Content/Sounds/*

#Map Assets
Content/Map_Assets/*
Content/Map_Assets/*

#Particle Effects
Content/InfinityBladeEffects/*
Binary file modified ProjectEroica/Content/Blueprints/BP_Enemy.uasset
Binary file not shown.
Binary file modified ProjectEroica/Content/Blueprints/BP_MyCharacter.uasset
Binary file not shown.
Binary file modified ProjectEroica/Content/Map_Assets/Blueprint/GearBoard.uasset
Binary file not shown.
Binary file not shown.
Binary file modified ProjectEroica/Content/Map_Assets/Blueprint/ShipParts1.uasset
Binary file not shown.
Binary file modified ProjectEroica/Content/Map_Assets/Mesh/Top2.uasset
Binary file not shown.
Binary file modified ProjectEroica/Content/Map_Assets/ShipMap.umap
Binary file not shown.
Binary file modified ProjectEroica/Content/Map_Assets/ShipMap_BuiltData.uasset
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.
46 changes: 27 additions & 19 deletions ProjectEroica/Source/ProjectEroica/AI_Kisa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -56,31 +56,39 @@ void AAI_Kisa::Scout()
//float currRotation = GetActorRotation().Yaw;
//move if you see pawn and aren't currently attacking
if (justSawPawn == true) {
// we have to move closer
//decide which way to move
if (currRotation > 1) {
if (currTime - AIprevDash > dashCoolDown) {
Dash(1);
//if we're within striking distance
if (FMath::Abs(SeenPawnLocation.Y - GetActorLocation().Y) < 100) {
currTime = GetWorld()->GetRealTimeSeconds();
if (currTime - prevAttack > AttackCoolDown) {
UE_LOG(LogTemp, Warning, TEXT("UPDATE!"));
State = Idle;
Attack();
prevAttack = currTime;
}
else MoveRight(-1);
}
// else we have to move closer
else {
if (currTime -AIprevDash > dashCoolDown) {
Dash(-1);
//slow down dash if we're close to Pawn
if (FMath::Abs(SeenPawnLocation.Y - GetActorLocation().Y) < 300) {
dashForce = 750;
}
else dashForce = 1500;
//decide which way to move
if (currRotation > 1) {
if (currTime - AIprevDash > dashCoolDown) {
Dash(1);
}
else MoveRight(-1);
}
else {
if (currTime - AIprevDash > dashCoolDown) {
Dash(-1);
}
MoveRight(1);
}
MoveRight(1);
}
}
//if we're within striking distance
if (FMath::Abs(SeenPawnLocation.Y - GetActorLocation().Y) < 100) {
currTime = GetWorld()->GetRealTimeSeconds();
if (currTime - prevAttack > AttackCoolDown) {
UE_LOG(LogTemp, Warning, TEXT("UPDATE!"));
State = Idle;
Attack();
prevAttack = currTime;
}
}

}
GetWorld()->GetTimerManager().SetTimer(ScoutHandle, this, &AAI_Kisa::Scout, 1.0f, false);
}
38 changes: 34 additions & 4 deletions ProjectEroica/Source/ProjectEroica/AnimInstanceKisa.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2,24 +2,54 @@

#include "AnimInstanceKisa.h"
#include "Kismet/GameplayStatics.h"
#include "UObject/ConstructorHelpers.h"
#include "Runtime/Engine/Classes/Particles/ParticleSystemComponent.h"
#include "TP_SideScrollerCharacter.h"
#include "TimerManager.h"

UAnimInstanceKisa::UAnimInstanceKisa()
{
DustParticle = CreateDefaultSubobject<UParticleSystem>(TEXT("DustParticle"));
}

void UAnimInstanceKisa::endParticleEffect()
{
UParticleSystemComponent* p = activeDustParticles.Pop();
p->DestroyComponent();
}


void UAnimInstanceKisa::HandleState(FString newState) {
if (newState != State) {
if (newState == "Dash") {
UGameplayStatics::PlaySound2D(this, DashSound);

//creates a new dust particle and adds it to array of active particles
activeDustParticles.Add(UGameplayStatics::SpawnEmitterAtLocation(this, DustParticle, owningChar->GetMesh()->GetSocketLocation("DustSocket")));
FTimerHandle temp = FTimerHandle();
GetWorld()->GetTimerManager().SetTimer(temp, this, &UAnimInstanceKisa::endParticleEffect, dustDuration, false);
}
else if (newState == "Land" && State == "Jump") {
UGameplayStatics::PlaySound2D(this, LandSound);

//creates a new dust particle and adds it to array of active particles
activeDustParticles.Add(UGameplayStatics::SpawnEmitterAtLocation(this, DustParticle, owningChar->GetMesh()->GetSocketLocation("DustSocket")));
FTimerHandle temp = FTimerHandle();
GetWorld()->GetTimerManager().SetTimer(temp, this, &UAnimInstanceKisa::endParticleEffect, dustDuration, false);
}
else if (newState == "BaseCombo1") {
UGameplayStatics::PlaySound2D(this, BaseCombo1);
else if (newState == "Combo1") {
UGameplayStatics::PlaySound2D(this, Combo1);
}
else if (newState == "DashAttack") {
UGameplayStatics::PlaySound2D(this, DashAttackSound);
}
else if (newState == "JumpAttack") {
UGameplayStatics::PlaySound2D(this, JumpAttackSound);
}
FString path = "AnimSequence'/Game/Art_Assets/Animations/" + newState + "." + newState + "'/";
ourAnimation = Cast<UAnimSequence>(StaticLoadObject(UAnimSequence::StaticClass(), NULL, *path));
State = newState;
playOurAnimation();
}
State = newState;
}
}

29 changes: 24 additions & 5 deletions ProjectEroica/Source/ProjectEroica/AnimInstanceKisa.h
Original file line number Diff line number Diff line change
Expand Up @@ -6,20 +6,32 @@
#include "Animation/AnimInstance.h"
#include "AnimInstanceKisa.generated.h"

/**
*
*/
class ATP_SideScrollerCharacter;
UCLASS()
class PROJECTEROICA_API UAnimInstanceKisa : public UAnimInstance
{
GENERATED_BODY()

public:
float dustDuration = 0.5f;
void endParticleEffect();
UAnimInstanceKisa();
UPROPERTY()
//stores activ dust particles
TArray<UParticleSystemComponent*> activeDustParticles;
UPROPERTY()
ATP_SideScrollerCharacter* owningChar;
//Handles aesthetics for each state
UFUNCTION()
void HandleState(FString newState);
UPROPERTY(VisibleAnywhere, BlueprintReadWrite)
FString State = "Idle";

//Particle Systems
UPROPERTY(EditDefaultsOnly, Category = "Particles")
UParticleSystem* DustParticle;

UAnimationAsset* BaseCombo1;
//Sounds
UPROPERTY(EditDefaultsOnly, Category = "Sounds")
USoundBase* DashSound;
UPROPERTY(EditDefaultsOnly, Category = "Sounds")
Expand All @@ -31,7 +43,14 @@ class PROJECTEROICA_API UAnimInstanceKisa : public UAnimInstance
UPROPERTY(EditDefaultsOnly, Category = "Sounds")
USoundBase* JumpAttackSound;
UPROPERTY(EditDefaultsOnly, Category = "Sounds")
USoundBase* BaseCombo1;
USoundBase* Combo1;
UPROPERTY(EditDefaultsOnly, Category = "Sounds")
USoundBase* PainSound;

UPROPERTY(VisibleAnywhere, BlueprintReadWrite, Category = "Animations")
UAnimSequence* ourAnimation = Cast<UAnimSequence>(StaticLoadObject(UAnimSequence::StaticClass(), NULL, TEXT("AnimSequence'/Game/Art_Assets/Animations/Idle.Idle'/")));

//plays the actual animation
UFUNCTION(BlueprintImplementableEvent,BlueprintCallable)
void playOurAnimation();
};
45 changes: 39 additions & 6 deletions ProjectEroica/Source/ProjectEroica/AttackHandler.cpp
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
// Fill out your copyright notice in the Description page of Project Settings.

#include "AttackHandler.h"

#include "UObject/ConstructorHelpers.h"

// Sets default values for this component's properties
UAttackHandler::UAttackHandler()
Expand All @@ -20,11 +20,32 @@ void UAttackHandler::BeginPlay()

void UAttackHandler::initializeAttack(FString attackName)
{
if (attackName == "BaseCombo1") {
//reset hit counter
hitCounter = 0;
if (attackName == "Combo1") {
stunDuration = .7;
dmg = 15;
hitType = "Stunned";
}
else if (attackName == "Combo2") {
stunDuration = .7;
dmg = 15;
hitType = "Stunned";
}
else if (attackName == "Combo3") {
stunDuration = .7;
dmg = 15;
hitType = "Stunned";
}
else if (attackName == "Combo4") {
stunDuration = .7;
dmg = 15;
hitType = "Stunned";
}
else if (attackName == "Combo5") {
stunDuration = .7;
dmg = 15;
hitType = "Stunned";
attackDuration = 1;
}
else if (attackName == "DashAttack") {
dmg = 20;
Expand All @@ -43,11 +64,23 @@ void UAttackHandler::initializeAttack(FString attackName)

FString UAttackHandler::DetermineAttack(FString currState)
{
if (currState == "Dash") {
if (currState == "Dash" || currState == "Running") {
return "DashAttack";
}
else if (currState == "Idle") {
return "BaseCombo1";
else if (currState == "Idle" || currState == "Walking") {
return "Combo1";
}
else if (currState == "Combo1") {
return "Combo2";
}
else if (currState == "Combo2") {
return "Combo3";
}
else if (currState == "Combo3") {
return "Combo4";
}
else if (currState == "Combo4") {
return "Combo5";
}
else if (currState == "Jump") {
return "JumpAttack";
Expand Down
4 changes: 3 additions & 1 deletion ProjectEroica/Source/ProjectEroica/AttackHandler.h
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,9 @@ class PROJECTEROICA_API UAttackHandler : public UActorComponent
float dmg = 0;
UPROPERTY(EditDefaultsOnly)
FVector KnockupForce = FVector(0, 0, 0);

//how many times this attack has already hit an enemy
UPROPERTY()
float hitCounter = 0;
UPROPERTY(EditDefaultsOnly)
float DashAttackY = 200;
UPROPERTY(EditDefaultsOnly)
Expand Down
Loading

0 comments on commit 6abf308

Please sign in to comment.