서포터
This commit is contained in:
parent
59237c3808
commit
89a4edf6ba
|
|
@ -19504,7 +19504,7 @@ Transform:
|
||||||
serializedVersion: 2
|
serializedVersion: 2
|
||||||
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
m_LocalRotation: {x: -0, y: -0, z: -0, w: 1}
|
||||||
m_LocalPosition: {x: 0, y: 0, z: 0}
|
m_LocalPosition: {x: 0, y: 0, z: 0}
|
||||||
m_LocalScale: {x: 30, y: 30, z: 30}
|
m_LocalScale: {x: 0.3, y: 0.3, z: 0.3}
|
||||||
m_ConstrainProportionsScale: 1
|
m_ConstrainProportionsScale: 1
|
||||||
m_Children:
|
m_Children:
|
||||||
- {fileID: 6258493809283694057}
|
- {fileID: 6258493809283694057}
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,7 @@ GameObject:
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 871324411638548332}
|
- component: {fileID: 871324411638548332}
|
||||||
- component: {fileID: 2542221352418147852}
|
- component: {fileID: 2542221352418147852}
|
||||||
|
- component: {fileID: 5424467115007168901}
|
||||||
m_Layer: 0
|
m_Layer: 0
|
||||||
m_Name: P_electric
|
m_Name: P_electric
|
||||||
m_TagString: Untagged
|
m_TagString: Untagged
|
||||||
|
|
@ -47,6 +48,42 @@ MonoBehaviour:
|
||||||
m_EditorClassIdentifier:
|
m_EditorClassIdentifier:
|
||||||
m_Speed: 12
|
m_Speed: 12
|
||||||
radius: 0.1
|
radius: 0.1
|
||||||
|
--- !u!58 &5424467115007168901
|
||||||
|
CircleCollider2D:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 871324411638548333}
|
||||||
|
m_Enabled: 1
|
||||||
|
serializedVersion: 3
|
||||||
|
m_Density: 1
|
||||||
|
m_Material: {fileID: 0}
|
||||||
|
m_IncludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_ExcludeLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 0
|
||||||
|
m_LayerOverridePriority: 0
|
||||||
|
m_ForceSendLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_ForceReceiveLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_ContactCaptureLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_CallbackLayers:
|
||||||
|
serializedVersion: 2
|
||||||
|
m_Bits: 4294967295
|
||||||
|
m_IsTrigger: 0
|
||||||
|
m_UsedByEffector: 0
|
||||||
|
m_CompositeOperation: 0
|
||||||
|
m_CompositeOrder: 0
|
||||||
|
m_Offset: {x: 0, y: 19.61}
|
||||||
|
m_Radius: 20
|
||||||
--- !u!1 &3236510714245265456
|
--- !u!1 &3236510714245265456
|
||||||
GameObject:
|
GameObject:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -522,6 +522,7 @@ GameObject:
|
||||||
serializedVersion: 6
|
serializedVersion: 6
|
||||||
m_Component:
|
m_Component:
|
||||||
- component: {fileID: 7190565166110990598}
|
- component: {fileID: 7190565166110990598}
|
||||||
|
- component: {fileID: -7235425391866733918}
|
||||||
- component: {fileID: 6927600069059857145}
|
- component: {fileID: 6927600069059857145}
|
||||||
- component: {fileID: 4437869204647637986}
|
- component: {fileID: 4437869204647637986}
|
||||||
- component: {fileID: 2363079218329043429}
|
- component: {fileID: 2363079218329043429}
|
||||||
|
|
@ -556,6 +557,20 @@ Transform:
|
||||||
- {fileID: 4350914001303417402}
|
- {fileID: 4350914001303417402}
|
||||||
m_Father: {fileID: 0}
|
m_Father: {fileID: 0}
|
||||||
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
|
||||||
|
--- !u!114 &-7235425391866733918
|
||||||
|
MonoBehaviour:
|
||||||
|
m_ObjectHideFlags: 0
|
||||||
|
m_CorrespondingSourceObject: {fileID: 0}
|
||||||
|
m_PrefabInstance: {fileID: 0}
|
||||||
|
m_PrefabAsset: {fileID: 0}
|
||||||
|
m_GameObject: {fileID: 497443208249652342}
|
||||||
|
m_Enabled: 1
|
||||||
|
m_EditorHideFlags: 0
|
||||||
|
m_Script: {fileID: 11500000, guid: 0060bc8cb08eb034cbeefb2ed78a29ed, type: 3}
|
||||||
|
m_Name:
|
||||||
|
m_EditorClassIdentifier:
|
||||||
|
MaxAttackCoolTime: 2
|
||||||
|
Damage: 5
|
||||||
--- !u!114 &6927600069059857145
|
--- !u!114 &6927600069059857145
|
||||||
MonoBehaviour:
|
MonoBehaviour:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,41 @@
|
||||||
|
using UnityEngine;
|
||||||
|
|
||||||
|
public class SupporterActor : MonoBehaviour
|
||||||
|
{
|
||||||
|
public float MaxAttackCoolTime = 2f;
|
||||||
|
public int Damage = 5;
|
||||||
|
|
||||||
|
float attackCoolTime;
|
||||||
|
ProjectileData m_PD = new ProjectileData();
|
||||||
|
|
||||||
|
private void OnEnable()
|
||||||
|
{
|
||||||
|
attackCoolTime = MaxAttackCoolTime;
|
||||||
|
m_PD.IsPC = true;
|
||||||
|
m_PD.Dmg = Damage;
|
||||||
|
m_PD.m_Data = table_projectile.Ins.Get_Data(3201);
|
||||||
|
}
|
||||||
|
|
||||||
|
private void Update()
|
||||||
|
{
|
||||||
|
attackCoolTime -= Time.deltaTime;
|
||||||
|
if (attackCoolTime < 0)
|
||||||
|
{
|
||||||
|
attackCoolTime = MaxAttackCoolTime;
|
||||||
|
var mob = IngameMgr.Ins.FindNearestMob(transform.position, null);
|
||||||
|
UpdateAngle(mob.transform.position);
|
||||||
|
m_PD.tf_Start = transform;
|
||||||
|
ProjectileMgr.Ins.Shoot_Projectile(m_PD);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void UpdateAngle(Vector2 targetWorldPos)
|
||||||
|
{
|
||||||
|
Vector2 dir = targetWorldPos - (Vector2)transform.position;
|
||||||
|
|
||||||
|
if (dir.sqrMagnitude < 0.0001f)
|
||||||
|
return;
|
||||||
|
|
||||||
|
transform.up = dir.normalized;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,2 @@
|
||||||
|
fileFormatVersion: 2
|
||||||
|
guid: 0060bc8cb08eb034cbeefb2ed78a29ed
|
||||||
|
|
@ -369,6 +369,7 @@ public class IngameMgr : MonoBehaviourSingletonTemplate<IngameMgr>
|
||||||
{
|
{
|
||||||
if (f_SupporterCoolTime > 0f) return;
|
if (f_SupporterCoolTime > 0f) return;
|
||||||
f_SupporterCoolTime = 600f;
|
f_SupporterCoolTime = 600f;
|
||||||
|
go_Supporter.SetActive(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -20,6 +20,9 @@ public class EffectMgr : MonoBehaviourSingletonTemplate<EffectMgr>
|
||||||
|
|
||||||
public void Show_Effect(string effectpath, Vector2 pos, float scale = 100f)
|
public void Show_Effect(string effectpath, Vector2 pos, float scale = 100f)
|
||||||
{
|
{
|
||||||
|
if (!effectpath.Contains("Effect/"))
|
||||||
|
effectpath = $"Effect/{effectpath}";
|
||||||
|
|
||||||
if (!dic_effect.ContainsKey(effectpath))
|
if (!dic_effect.ContainsKey(effectpath))
|
||||||
dic_effect.Add(effectpath, new List<GameObject>());
|
dic_effect.Add(effectpath, new List<GameObject>());
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue