private void Move() { if (childDirection.IsNone()) { energy.Damage(restExpend); } else if (childDirection.IsRight()) { if (collider.IsThrough("ChildStopR")) { return; } if (CheckFall(true)) { return; } } else if (childDirection.IsLeft()) { if (collider.IsThrough("ChildStopL")) { return; } if (CheckFall(false)) { return; } } energy.Damage(moveExpend); entity.transform.Position = bezierPoint.GetNowPosition(); }
private bool CollitionCheck(Entity entity) { if (energy.IsDead()) { return(true); } if (!IsColliderValid(entity)) { return(false); } if (collider.IsThrough("Boar")) { return(true); } if (collider.ThroughStart("Eagle")) { energy.Damage(5); SurrenderChild(entity); return(energy.IsDead()); } return(false); }
private bool CollitionCheck(Entity entity) { if (deadCheck.IsDead()) { return(true); } collider = entity.GetColliderComponent("Player"); if (collider == null) { return(false); } if (collider.IsThrough("Boar")) { return(true); } if (collider.ThroughStart("Eagle")) { energy.Damage(5); return(energy.IsDead()); } return(false); }