Upload from upload_mods.ps1

This commit is contained in:
Nathaniel Cosford
2025-06-04 16:13:36 +09:30
commit e3c48b54dc
17 changed files with 1157 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using UnityEngine;
using static AstarManager;
namespace FullautoLauncher.Scripts.ProjectileManager
{
public class SimpleMeshTransformData
{
public readonly Matrix4x4 TRS;
public readonly Bounds bounds;
public SimpleMeshTransformData(Matrix4x4 TRS, Bounds bounds)
{
this.TRS = TRS;
this.bounds = bounds;
}
}
public class PHSimpleMesh : ParameterHolderAbs
{
public Matrix4x4 finalMat;
public RenderParams renderParams;
private SimpleMeshTransformData data;
public PHSimpleMesh(ProjectileParams par, SimpleMeshTransformData data, in RenderParams renderPar) : base(par)
{
this.data = data;
this.renderParams = renderPar;
}
public override void Fire()
{
UpdatePosition();
}
public override void UpdatePosition()
{
finalMat = Matrix4x4.Translate(par.renderPosition - Origin.position) * Matrix4x4.Rotate(Quaternion.LookRotation(par.moveDir)) * data.TRS;
Bounds bounds = data.bounds;
bounds.center = finalMat.MultiplyPoint3x4(bounds.center);
renderParams.worldBounds = bounds;
}
}
}