(client) feat:添加基地界面到游玩界面的过程,添加存档管理,技能树变得可用 (#58)

Co-authored-by: m0_75251201 <m0_75251201@noreply.gitcode.com>
Reviewed-on: http://47.107.252.169:3000/Roguelite-Game-Developing-Team/Gen_Hack-and-Slash-Roguelite/pulls/58
This commit is contained in:
2025-10-03 00:31:34 +08:00
parent aff747be17
commit dd9d90439d
134 changed files with 10322 additions and 4872 deletions

View File

@@ -14,23 +14,25 @@ namespace Entity
public void SetBulletSource(Entity source)
{
bulletSource = source;
attributes.attack = source.attributes.attack;
AttributesNow.attack = source.AttributesNow.attack;
var weapon = source.GetCurrentWeapon();
if (weapon != null)
{
lifeTime = weapon.Attributes.attackRange / attributes.moveSpeed;
lifeTime = weapon.Attributes.attackRange / AttributesNow.moveSpeed;
}
affiliation = source.affiliation;
}
public override void SetTarget(Vector3 pos)
{
base.SetTarget(pos);
Utils.RotateTool.RotateTransformToDirection(transform, direction);
Utils.RotateTool.RotateTransformToDirection(transform, Direction);
}
protected override void AutoBehave()
{
TryMove();
Move();
lifeTime -= Time.deltaTime;
if (lifeTime <= 0)
{
@@ -41,7 +43,12 @@ namespace Entity
private void OnTriggerEnter2D(Collider2D other)
{
var entity = other.GetComponent<Entity>();
if (IsDead||!entity || entity == bulletSource || entity is Pickup) return;
if (!entity)
{
Kill();
return;
}
if (IsDead || entity == bulletSource || entity is Pickup) return;
if (Managers.AffiliationManager.Instance.GetRelation(bulletSource.affiliation, entity.affiliation) != Relation.Friendly || Setting.Instance.CurrentSettings.friendlyFire)
{
entity.OnHit(this);
@@ -51,7 +58,7 @@ namespace Entity
return; // 如果是友好关系且不允许友军伤害,则不处理
}
attributes.health -= 1;
AttributesNow.health -= 1;
}