This commit is contained in:
wuyanchen 2025-12-12 12:56:13 +08:00
parent 9b21168241
commit f3e9a69266
8 changed files with 89 additions and 13 deletions

View File

@ -344,7 +344,7 @@ MonoBehaviour:
m_EditorClassIdentifier:
minHealthPercent: 30
maxHealthPercent: 100
health: 150
health: 600
boomClip: {fileID: 0}
addEulerX: 0
randomColors:

View File

@ -643,16 +643,16 @@ MonoBehaviour:
muzzleFlare: {fileID: 4000010921236120, guid: 6a0a0f7a97e0e7747accda091cb14743,
type: 3}
bullet: {fileID: 4010437552377404, guid: 3e8f90cf5ace53541b8523ce5200cdc5, type: 3}
continueShotCount: 1
continueShotCount: 2
turret: {fileID: 1898544591301130533}
gun: {fileID: 5342608149001152939}
shotAudioClip: {fileID: 8300000, guid: 038911361e37ae84b8fdc585b7b83895, type: 3}
hitAudioClip: {fileID: 8300000, guid: 66e0e24e6ada67b4ba418891e0d2460a, type: 3}
shotDuration: 0.8
shotDuration: 0.6
shotNextDuration: 0.1
shotDistance: 12
shotSpeed: 20
initBulletCount: 150
initBulletCount: 50
shotOffsetZMul: 0
shotFixAngleX: 0
lerpSpeed: 5

View File

@ -279,7 +279,7 @@ MonoBehaviour:
m_Script: {fileID: 11500000, guid: 18e44bc2064cb1c46b4422845bd22c3c, type: 3}
m_Name:
m_EditorClassIdentifier:
initCount: 2
initCount: 5
radius: 1.8
splitAngle: 0
isAlwaysForward: 1
@ -1371,8 +1371,8 @@ MonoBehaviour:
type: 3}
moveAction: {fileID: -9022483357595872026, guid: 50486e0197319e948b872b25ef15b507,
type: 3}
moveSpeed: 10
moveMul: 1
moveSpeed: 3.5
moveMul: 2
uiRaycaster: {fileID: 0}
--- !u!1 &621660291
GameObject:
@ -2059,7 +2059,7 @@ GameObject:
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 1
m_IsActive: 0
--- !u!4 &1020054737
Transform:
m_ObjectHideFlags: 0
@ -2285,7 +2285,7 @@ RectTransform:
m_GameObject: {fileID: 1138813630}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 3.5815973, y: 3.5815973, z: 1}
m_LocalScale: {x: 4.0642366, y: 4.0642366, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 97192695}
@ -2806,6 +2806,10 @@ PrefabInstance:
type: 3}
insertIndex: -1
addedObject: {fileID: 1393153741}
- targetCorrespondingSourceObject: {fileID: 1110803909258152, guid: 2d237edc016bc304b97f97864fdb21e3,
type: 3}
insertIndex: -1
addedObject: {fileID: 1393153747}
- targetCorrespondingSourceObject: {fileID: 1110803909258152, guid: 2d237edc016bc304b97f97864fdb21e3,
type: 3}
insertIndex: -1
@ -2849,7 +2853,7 @@ MonoBehaviour:
shotNextDuration: 0.1
shotDistance: 12
shotSpeed: 35
initBulletCount: 150
initBulletCount: 50
shotOffsetZMul: 0
shotFixAngleX: 0
lerpSpeed: 8
@ -2879,6 +2883,20 @@ BoxCollider:
serializedVersion: 3
m_Size: {x: 22.852602, y: 18.47967, z: 30.402958}
m_Center: {x: 0, y: 3.2769928, z: -1.3586216}
--- !u!114 &1393153747
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1393153740}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: eb8f8bc7274eee941a7520142bab6f4d, type: 3}
m_Name:
m_EditorClassIdentifier:
flipSpeed: 5
flipAngle: 25
--- !u!1 &1524927936
GameObject:
m_ObjectHideFlags: 0
@ -3499,7 +3517,7 @@ RectTransform:
m_GameObject: {fileID: 2083258305}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 3.5815973, y: 3.5815973, z: 1}
m_LocalScale: {x: 4.0642366, y: 4.0642366, z: 1}
m_ConstrainProportionsScale: 0
m_Children: []
m_Father: {fileID: 97192695}

View File

@ -0,0 +1,46 @@
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
public class AirPlane : MonoBehaviour
{
[Tooltip("×óÓÒ·­×ªËÙ¶È")]
public float flipSpeed = 1f;
[Tooltip("×óÓÒ·­×ª½Ç¶È")]
public float flipAngle = 25f;
private float beforePositionX = 0;
private float lerpEulerAnglesZ = 0;
private float targetEulerAnglesZ = 0;
private Vector3 targetEulerAngles = Vector3.zero;
// Start is called before the first frame update
void Start()
{
beforePositionX = transform.position.x;
targetEulerAngles = transform.eulerAngles;
lerpEulerAnglesZ = transform.eulerAngles.z;
targetEulerAnglesZ = lerpEulerAnglesZ;
}
// Update is called once per frame
void Update()
{
if (transform.position.x < beforePositionX)
{
targetEulerAnglesZ = flipAngle;
}
else
{
targetEulerAnglesZ = -flipAngle;
}
beforePositionX = Mathf.Lerp(beforePositionX, transform.position.x, Time.deltaTime * flipSpeed);
if (Mathf.Abs(beforePositionX - transform.position.x) < 0.8f)
{
targetEulerAnglesZ = 0;
}
lerpEulerAnglesZ = Mathf.Lerp(lerpEulerAnglesZ, targetEulerAnglesZ, Time.deltaTime * flipSpeed);
targetEulerAngles.Set(transform.position.x, transform.position.y, lerpEulerAnglesZ);
transform.eulerAngles = targetEulerAngles;
}
}

View File

@ -0,0 +1,11 @@
fileFormatVersion: 2
guid: WigX4yL/AHzMWL1HV6q2eLH/Ft/MGRUznhz7qjGxgDCW+zggX16HBV0=
MonoImporter:
externalObjects: {}
serializedVersion: 2
defaultReferences: []
executionOrder: 0
icon: {instanceID: 0}
userData:
assetBundleName:
assetBundleVariant:

View File

@ -325,6 +325,7 @@ namespace Assets.Scripts
IsAutoLock = false;
//IsLockedTarget = false;
hittedEnemy = null;
LockTarget = null;
_shotTargetPosition = Vector3.zero;

View File

@ -705,7 +705,7 @@ public class Shot : MonoBehaviour
float distance = Vector3.Distance(lockEnemy.transform.position, gun.position);
if (distance > shotDistance)
{
isCanShot = false;
//isCanShot = false;
lockEnemy = null;
turretLerpEuler.Set(turret.eulerAngles.x, turret.eulerAngles.y, turret.eulerAngles.z);
//ResetTurretEuler();

View File

@ -123,7 +123,7 @@ Material:
m_Colors:
- _BaseColor: {r: 1, g: 1, b: 1, a: 1}
- _Color: {r: 1, g: 1, b: 1, a: 1}
- _EmissionColor: {r: 128, g: 128, b: 128, a: 1}
- _EmissionColor: {r: 32, g: 32, b: 32, a: 1}
- _SpecColor: {r: 0.2, g: 0.2, b: 0.2, a: 1}
m_BuildTextureStacks: []
--- !u!114 &930770268605637680