Added particle and bug fixes #437
|
@ -7501,7 +7501,7 @@
|
|||
- EID: 65775
|
||||
Name: Player
|
||||
IsActive: true
|
||||
NumberOfChildren: 6
|
||||
NumberOfChildren: 8
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: -8, y: 0.899999976, z: -4}
|
||||
|
@ -7547,6 +7547,7 @@
|
|||
Scripts:
|
||||
- Type: PlayerController
|
||||
Enabled: true
|
||||
smokeCount: 4
|
||||
respawnPoint: 65732
|
||||
currentState: 0
|
||||
walkMaxMoveVel: 2.5
|
||||
|
@ -7565,6 +7566,8 @@
|
|||
heavyMultiper: 0.5
|
||||
silhouettePlayer: 462
|
||||
silhouetteBag: 465
|
||||
leftParticle: 573
|
||||
rightParticle: 574
|
||||
- Type: PickAndThrow
|
||||
Enabled: true
|
||||
throwForce: [8, 4, 8]
|
||||
|
@ -7723,6 +7726,66 @@
|
|||
"Color Eval Rate ": 0.5
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 573
|
||||
Name: LeftSmoke
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: 0.0899999142, y: 0.100000001, z: -6.25735765e-08}
|
||||
Rotate: {x: -5.83341553e-08, y: -3.14159274, z: 1.10461471e-08}
|
||||
Scale: {x: 1.00000012, y: 1, z: 1.00000012}
|
||||
IsActive: true
|
||||
classSHADE::SHParticleEmitterComponent:
|
||||
Emission Count: 8
|
||||
Is Passive: false
|
||||
Emission Interval: 0
|
||||
Min Life: 0.100000001
|
||||
Max Life: 2
|
||||
Minimum Speed: 1
|
||||
Maximum Speed: 1.5
|
||||
Minimum Size: 0.100000001
|
||||
Maximum Size: 0.100000001
|
||||
Size Decay: 0.907000005
|
||||
Angular Ranges And Offset: {x: 0.779999971, y: 0, z: -1.57070005, w: 0}
|
||||
Rotation Speed: 0.805999994
|
||||
Rotation Decay: 0
|
||||
Texture Asset ID: 56224060
|
||||
Custom Update Shader Asset ID: 42141152
|
||||
Color Tint: {x: 1, y: 1, z: 1, w: 1}
|
||||
Acceleration: {x: 0, y: 0.0500000007, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 574
|
||||
Name: RightSmoke
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: -0.0900000036, y: 0.100000001, z: -1.03427794e-07}
|
||||
Rotate: {x: -5.83341553e-08, y: -3.14159274, z: 1.10461471e-08}
|
||||
Scale: {x: 1.00000012, y: 1, z: 1.00000012}
|
||||
IsActive: true
|
||||
classSHADE::SHParticleEmitterComponent:
|
||||
Emission Count: 8
|
||||
Is Passive: false
|
||||
Emission Interval: 0
|
||||
Min Life: 0.100000001
|
||||
Max Life: 2
|
||||
Minimum Speed: 1
|
||||
Maximum Speed: 1.5
|
||||
Minimum Size: 0.100000001
|
||||
Maximum Size: 0.100000001
|
||||
Size Decay: 0.907000005
|
||||
Angular Ranges And Offset: {x: 0.779999971, y: 0, z: -1.57070005, w: 0}
|
||||
Rotation Speed: 0.805999994
|
||||
Rotation Decay: 0
|
||||
Texture Asset ID: 56224060
|
||||
Custom Update Shader Asset ID: 42141152
|
||||
Color Tint: {x: 1, y: 1, z: 1, w: 1}
|
||||
Acceleration: {x: 0, y: 0.0500000007, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 65732
|
||||
Name: RespawnPoint
|
||||
IsActive: true
|
||||
|
|
|
@ -11964,7 +11964,7 @@
|
|||
- EID: 65775
|
||||
Name: Player
|
||||
IsActive: true
|
||||
NumberOfChildren: 6
|
||||
NumberOfChildren: 8
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: 5.5, y: 0.171148509, z: 10}
|
||||
|
@ -12010,6 +12010,7 @@
|
|||
Scripts:
|
||||
- Type: PlayerController
|
||||
Enabled: true
|
||||
smokeCount: 4
|
||||
respawnPoint: 66065
|
||||
currentState: 0
|
||||
walkMaxMoveVel: 2.5
|
||||
|
@ -12028,6 +12029,8 @@
|
|||
heavyMultiper: 0.5
|
||||
silhouettePlayer: 462
|
||||
silhouetteBag: 465
|
||||
leftParticle: 66138
|
||||
rightParticle: 66137
|
||||
- Type: PickAndThrow
|
||||
Enabled: true
|
||||
throwForce: [10, 4, 10]
|
||||
|
@ -12182,6 +12185,66 @@
|
|||
"Color Eval Rate ": 0.5
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 66138
|
||||
Name: LeftSmoke
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: 0.0899999142, y: 0.100000001, z: -6.25735765e-08}
|
||||
Rotate: {x: -5.83341553e-08, y: -3.14159274, z: 1.10461471e-08}
|
||||
Scale: {x: 1.00000012, y: 1, z: 1.00000012}
|
||||
IsActive: true
|
||||
classSHADE::SHParticleEmitterComponent:
|
||||
Emission Count: 8
|
||||
Is Passive: false
|
||||
Emission Interval: 0
|
||||
Min Life: 0.100000001
|
||||
Max Life: 2
|
||||
Minimum Speed: 1
|
||||
Maximum Speed: 1.5
|
||||
Minimum Size: 0.100000001
|
||||
Maximum Size: 0.100000001
|
||||
Size Decay: 0.907000005
|
||||
Angular Ranges And Offset: {x: 0.779999971, y: 0, z: -1.57070005, w: 0}
|
||||
Rotation Speed: 0.805999994
|
||||
Rotation Decay: 0
|
||||
Texture Asset ID: 56224060
|
||||
Custom Update Shader Asset ID: 42141152
|
||||
Color Tint: {x: 1, y: 1, z: 1, w: 1}
|
||||
Acceleration: {x: 0, y: 0.0500000007, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 66137
|
||||
Name: RightSmoke
|
||||
IsActive: true
|
||||
NumberOfChildren: 0
|
||||
Components:
|
||||
Transform Component:
|
||||
Translate: {x: -0.0900000036, y: 0.100000001, z: -1.03427794e-07}
|
||||
Rotate: {x: -5.83341553e-08, y: -3.14159274, z: 1.10461471e-08}
|
||||
Scale: {x: 1.00000012, y: 1, z: 1.00000012}
|
||||
IsActive: true
|
||||
classSHADE::SHParticleEmitterComponent:
|
||||
Emission Count: 8
|
||||
Is Passive: false
|
||||
Emission Interval: 0
|
||||
Min Life: 0.100000001
|
||||
Max Life: 2
|
||||
Minimum Speed: 1
|
||||
Maximum Speed: 1.5
|
||||
Minimum Size: 0.100000001
|
||||
Maximum Size: 0.100000001
|
||||
Size Decay: 0.907000005
|
||||
Angular Ranges And Offset: {x: 0.779999971, y: 0, z: -1.57070005, w: 0}
|
||||
Rotation Speed: 0.805999994
|
||||
Rotation Decay: 0
|
||||
Texture Asset ID: 56224060
|
||||
Custom Update Shader Asset ID: 42141152
|
||||
Color Tint: {x: 1, y: 1, z: 1, w: 1}
|
||||
Acceleration: {x: 0, y: 0.0500000007, z: 0}
|
||||
IsActive: true
|
||||
Scripts: ~
|
||||
- EID: 66065
|
||||
Name: RespawnPoint
|
||||
IsActive: true
|
||||
|
|
|
@ -25,6 +25,7 @@ public class Item : Script
|
|||
|
||||
|
||||
private bool checkSound = false;
|
||||
private bool homeownerOnce = true;
|
||||
public float soundDistance = 10;
|
||||
|
||||
private float highlightPos = 0.0f;
|
||||
|
@ -98,8 +99,11 @@ public class Item : Script
|
|||
rb.ClearTorque();
|
||||
}
|
||||
|
||||
if(transform)
|
||||
if (transform)
|
||||
{
|
||||
transform.LocalEulerAngles = Vector3.Zero;
|
||||
transform.LocalPosition = firstPostion;
|
||||
}
|
||||
|
||||
returnBack = false;
|
||||
}
|
||||
|
@ -143,11 +147,11 @@ public class Item : Script
|
|||
if(emitter)
|
||||
emitter.Emit();
|
||||
|
||||
Debug.Log("EMIT");
|
||||
}
|
||||
|
||||
if (info.GameObject.GetScript<Homeowner1>() && !returnBack)
|
||||
if (info.GameObject.GetScript<Homeowner1>() && homeownerOnce)
|
||||
{
|
||||
homeownerOnce = false;
|
||||
returnBack = true;
|
||||
}
|
||||
}
|
||||
|
@ -156,6 +160,7 @@ public class Item : Script
|
|||
{
|
||||
playSound = true;
|
||||
checkSound = true;
|
||||
homeownerOnce = true;
|
||||
}
|
||||
|
||||
}
|
|
@ -15,8 +15,11 @@ public class PlayerRunState : BaseState
|
|||
public override void OnEnter()
|
||||
{
|
||||
//Debug.Log("WALK ENTER");
|
||||
AudioHandler.audioClipHandlers["footsteps"].Play();
|
||||
timer = delay;
|
||||
machine.GetScript<PlayerController>().playLandedAnimation = false;
|
||||
machine.GetScript<PlayerController>().Leftsmoke.EmissionCount = machine.GetScript<PlayerController>().smokeCount * 4;
|
||||
machine.GetScript<PlayerController>().Rightsmoke.EmissionCount = machine.GetScript<PlayerController>().smokeCount * 4;
|
||||
|
||||
if (PlayerAnimations.Instance)
|
||||
{
|
||||
PlayerAnimations.Instance.playerAnimator.Play(PlayerAnimations.Instance.playerRunClip);
|
||||
|
|
|
@ -15,6 +15,8 @@ public class PlayerWalkState : BaseState
|
|||
{
|
||||
//Debug.Log("WALK ENTER");
|
||||
timer = delay;
|
||||
machine.GetScript<PlayerController>().Leftsmoke.EmissionCount = machine.GetScript<PlayerController>().smokeCount;
|
||||
machine.GetScript<PlayerController>().Rightsmoke.EmissionCount = machine.GetScript<PlayerController>().smokeCount;
|
||||
|
||||
machine.GetScript<PlayerController>().playLandedAnimation = false;
|
||||
|
||||
|
|
|
@ -26,6 +26,7 @@ public class PlayerController : Script
|
|||
public StateMachine stateMachine { get; set; }
|
||||
public ParticleEmitter Leftsmoke { get; set; }
|
||||
public ParticleEmitter Rightsmoke { get; set; }
|
||||
public int smokeCount = 4;
|
||||
|
||||
public bool holdItem { get; set; }
|
||||
public bool isAiming { get; set; }
|
||||
|
@ -222,7 +223,6 @@ public class PlayerController : Script
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
GotCaught();
|
||||
Rotation();
|
||||
MoveKey();
|
||||
|
@ -305,11 +305,11 @@ public class PlayerController : Script
|
|||
|
||||
private void Move()
|
||||
{
|
||||
if (rb != null && currentState != RaccoonStates.CAUGHT)
|
||||
if (rb && currentState != RaccoonStates.CAUGHT)
|
||||
{
|
||||
rb.LinearVelocity += new Vector3(axisMove.x * moveForce, 0.0f, axisMove.y * moveForce) * Time.DeltaTimeF;
|
||||
|
||||
if (isMoveKeyPress && rb)
|
||||
if (isMoveKeyPress)
|
||||
{
|
||||
Vector3 velNor = rb.LinearVelocity;
|
||||
velNor.y = 0.0f;
|
||||
|
@ -348,6 +348,13 @@ public class PlayerController : Script
|
|||
}
|
||||
}
|
||||
|
||||
if (Input.GetKey(Input.KeyCode.LeftShift) && !isMoveKeyPress && isGrounded)
|
||||
{
|
||||
currentState = RaccoonStates.IDLE;
|
||||
if (stateMachine && !stateMachine.IsState(typeof(PlayerIdleState)))
|
||||
stateMachine.SetState(typeof(PlayerIdleState));
|
||||
}
|
||||
|
||||
if (Input.GetKeyUp(Input.KeyCode.LeftShift))
|
||||
{
|
||||
if (isMoveKeyPress && isGrounded)
|
||||
|
@ -356,7 +363,7 @@ public class PlayerController : Script
|
|||
if (stateMachine && !stateMachine.IsState(typeof(PlayerWalkState)))
|
||||
stateMachine.SetState(typeof(PlayerWalkState));
|
||||
}
|
||||
else if(!isMoveKeyPress && isGrounded)
|
||||
else if (!isMoveKeyPress && isGrounded)
|
||||
{
|
||||
currentState = RaccoonStates.IDLE;
|
||||
if (stateMachine && !stateMachine.IsState(typeof(PlayerIdleState)))
|
||||
|
@ -496,6 +503,7 @@ public class PlayerController : Script
|
|||
if (holdItem)
|
||||
{
|
||||
holdItem = false;
|
||||
Debug.Log("PLAYER RETURN");
|
||||
pat.item.GetScript<Item>().returnBack = true;
|
||||
}
|
||||
if (isAiming)
|
||||
|
|
|
@ -316,7 +316,8 @@ namespace SHADE
|
|||
// Error handling
|
||||
if (!SHEntityManager::IsValidEID(entityID))
|
||||
{
|
||||
SHLOG_ERROR("Entity {} is invalid!", entityID)
|
||||
//geting spamed called, need to look into it
|
||||
SHLOG_ERROR_D("Entity {} is invalid!", entityID)
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,16 @@ namespace SHADE
|
|||
}
|
||||
|
||||
|
||||
System::Int32 ParticleEmitter::EmissionCount::get()
|
||||
{
|
||||
return (GetNativeComponent()->GetEmissionCount());
|
||||
}
|
||||
|
||||
void ParticleEmitter::EmissionCount::set(System::Int32 val)
|
||||
{
|
||||
GetNativeComponent()->SetEmissionCount(val);
|
||||
}
|
||||
|
||||
float ParticleEmitter::EmissionInterval::get()
|
||||
{
|
||||
return (GetNativeComponent()->GetEmissionInterval());
|
||||
|
|
|
@ -24,6 +24,12 @@ namespace SHADE
|
|||
void set(bool val);
|
||||
}
|
||||
|
||||
property System::Int32 EmissionCount
|
||||
{
|
||||
System::Int32 get();
|
||||
void set(System::Int32 val);
|
||||
}
|
||||
|
||||
property float EmissionInterval
|
||||
{
|
||||
float get();
|
||||
|
|
Loading…
Reference in New Issue