public override void Execute(GroundedEntityAI entityAI) { base.Execute(entityAI); //if (!entityAI.groundedEntity.IsTouchingJumpableSurface()) //{ // GameObject tempChit = GameObject.Instantiate<GameObject>(entityAI.chit, entityAI.transform.position, entityAI.transform.rotation); // tempChit.transform.parent = entityAI.JumpNodeContainer.transform; //} if (hasJumped) { timer = timer + Time.deltaTime; entityAI.jumpTimer += Time.deltaTime; entityAI.groundedEntity.SetDirectionalInput(directionalVector); } if (!hasJumped) { timer = 0; entityAI.groundedEntity.SetDirectionalInput(directionalVector); entityAI.groundedEntity.OnJumpInputDown(); hasJumped = true; } if (timer >= duration) { entityAI.groundedEntity.OnJumpInputUp(); } }
public override void Enter(GroundedEntityAI entityAI) { base.Enter(entityAI); entityAI.groundedEntity.OnSprintInputUp(); this.directionalVector = Vector2.zero; entityAI.jumpTimer = 0; }
public override void Enter(GroundedEntityAI entityAI) { base.Enter(entityAI); entityAI.path = entityAI.graph.GetPathIDs(entityAI.mostRecentNode, entityAI.graph.playerLastNodeID); entityAI.pathMessageLookup = entityAI.graph.GetPathMessages(entityAI.path); entityAI.messagePriorityQueue.Clear(); entityAI.messagePriorityQueue.Enqueue(entityAI.pathMessageLookup[entityAI.mostRecentNode], -1000); entityAI.isSearching = true; }
public override void Execute(GroundedEntityAI entityAI) { base.Execute(entityAI); entityAI.jumpTimer += Time.deltaTime; //GameObject tempChit = GameObject.Instantiate<GameObject>(entityAI.chit, entityAI.transform.position, entityAI.transform.rotation); //tempChit.transform.parent = entityAI.JumpNodeContainer.transform; if (!hasDodged) { entityAI.groundedEntity.OnDodgeInputDown(direction); } entityAI.groundedEntity.SetDirectionalInput(directionalVector); }
public override void Enter(GroundedEntityAI entityAI) { base.Enter(entityAI); if (holdingSprint) { entityAI.groundedEntity.OnSprintInputHold(); } else { entityAI.groundedEntity.OnSprintInputUp(); } SetDirectionalVector(); }
public override void Execute(GroundedEntityAI entityAI) { base.Execute(entityAI); entityAI.groundedEntity.SetDirectionalInput(Vector2.zero); if (duration > 0) { if (timer > duration && entityAI.navFSM.previousState != null) { entityAI.navFSM.ChangeState(entityAI.navFSM.previousState); } timer += Time.deltaTime; } }
public override void Enter(GroundedEntityAI entityAI) { base.Enter(entityAI); if ((entityAI.groundedEntity.directionalInput.x == -1 && direction) || (entityAI.groundedEntity.directionalInput.x == 1 && !direction)) { entityAI.groundedEntity.velocity.x = 0; } if (holdingSprint) { entityAI.groundedEntity.OnSprintInputHold(); } else { entityAI.groundedEntity.OnSprintInputUp(); } SetDirectionalVector(); entityAI.jumpTimer = 0; }
public override void Exit(GroundedEntityAI entityAI) { base.Exit(entityAI); entityAI.jumpTimer = -1; }
public override void Enter(GroundedEntityAI entityAI) { base.Enter(entityAI); entityAI.jumpTimer = 0; entityAI.groundedEntity.OnSprintInputUp(); }
public override void Exit(GroundedEntityAI entityAI) { base.Exit(entityAI); entityAI.jumpTimer = -1; entityAI.groundedEntity.OnJumpInputUp(); }
public override void Exit(GroundedEntityAI entityAI) { base.Exit(entityAI); //entityAI.groundedEntity.OnSprintInputUp(); }
public override void Execute(GroundedEntityAI entityAI) { base.Execute(entityAI); entityAI.groundedEntity.SetDirectionalInput(directionalVector); }
public override void Enter(GroundedEntityAI entityAI) { base.Enter(entityAI); entityAI.groundedEntity.OnSprintInputUp(); entityAI.isSearching = false; }