Враги атакуют ГГ после его перерождения.
This commit is contained in:
parent
c9e84be36b
commit
b48beabc1a
@ -5114,6 +5114,7 @@ MonoBehaviour:
|
|||||||
bonusSound: {fileID: 0}
|
bonusSound: {fileID: 0}
|
||||||
_startGame: {fileID: 8300000, guid: 074f6b4b9b40a344e9af80a6b6346201, type: 3}
|
_startGame: {fileID: 8300000, guid: 074f6b4b9b40a344e9af80a6b6346201, type: 3}
|
||||||
_controller: {fileID: 1801060035}
|
_controller: {fileID: 1801060035}
|
||||||
|
aSourse: {fileID: 1801060029}
|
||||||
--- !u!1001 &1850245407
|
--- !u!1001 &1850245407
|
||||||
PrefabInstance:
|
PrefabInstance:
|
||||||
m_ObjectHideFlags: 0
|
m_ObjectHideFlags: 0
|
||||||
@ -55621,16 +55622,106 @@ PrefabInstance:
|
|||||||
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
propertyPath: m_OnClick.m_PersistentCalls.m_Calls.Array.data[0].m_Target
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1801060021}
|
objectReference: {fileID: 1801060021}
|
||||||
|
- target: {fileID: 3195387929267588557, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3195387929267588557, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3195387929267588557, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3195387929267588557, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3195387929267588557, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 3195387929267588557, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5557455103468811314, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
- target: {fileID: 5557455103468811314, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: bonusController
|
propertyPath: bonusController
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1801060033}
|
objectReference: {fileID: 1801060033}
|
||||||
|
- target: {fileID: 5643681896748709694, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5643681896748709694, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5643681896748709694, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5643681896748709694, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5643681896748709694, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 5643681896748709694, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 5861359707769992997, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
- target: {fileID: 5861359707769992997, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: playerHealth
|
propertyPath: playerHealth
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1801060027}
|
objectReference: {fileID: 1801060027}
|
||||||
|
- target: {fileID: 6305254850507510473, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6305254850507510473, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6305254850507510473, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6305254850507510473, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6305254850507510473, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 6305254850507510473, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
- target: {fileID: 7117637457801964014, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
- target: {fileID: 7117637457801964014, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
type: 3}
|
type: 3}
|
||||||
propertyPath: _extraLife
|
propertyPath: _extraLife
|
||||||
@ -55776,6 +55867,36 @@ PrefabInstance:
|
|||||||
propertyPath: audioSource
|
propertyPath: audioSource
|
||||||
value:
|
value:
|
||||||
objectReference: {fileID: 1102420997}
|
objectReference: {fileID: 1102420997}
|
||||||
|
- target: {fileID: 8859217424454144084, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMax.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8859217424454144084, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchorMin.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8859217424454144084, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8859217424454144084, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_SizeDelta.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8859217424454144084, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.x
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
|
- target: {fileID: 8859217424454144084, guid: a72be70db1163c14b8b7a3cb1c00a59d,
|
||||||
|
type: 3}
|
||||||
|
propertyPath: m_AnchoredPosition.y
|
||||||
|
value: 0
|
||||||
|
objectReference: {fileID: 0}
|
||||||
m_RemovedComponents: []
|
m_RemovedComponents: []
|
||||||
m_SourcePrefab: {fileID: 100100000, guid: a72be70db1163c14b8b7a3cb1c00a59d, type: 3}
|
m_SourcePrefab: {fileID: 100100000, guid: a72be70db1163c14b8b7a3cb1c00a59d, type: 3}
|
||||||
--- !u!1 &7121823489171206717
|
--- !u!1 &7121823489171206717
|
||||||
|
@ -16,13 +16,21 @@ public class AudioChanger : MonoBehaviour
|
|||||||
|
|
||||||
[SerializeField] private AudioController _controller;
|
[SerializeField] private AudioController _controller;
|
||||||
|
|
||||||
private AudioSource aSourse;
|
[SerializeField] private AudioSource aSourse;
|
||||||
private float _startVolume;
|
private float _startVolume;
|
||||||
|
|
||||||
private void Awake() {
|
private void Awake() {
|
||||||
//if(state.defaultAction.name == "LaserAttack")/*
|
//if(state.defaultAction.name == "LaserAttack")/*
|
||||||
aSourse = GetComponent<AudioSource>();
|
if(aSourse != null)
|
||||||
|
{
|
||||||
|
//aSourse = GetComponent<AudioSource>();
|
||||||
_startVolume = aSourse.volume ;
|
_startVolume = aSourse.volume ;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
aSourse = GetComponent<AudioSource>();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
if(bonusSound != null)
|
if(bonusSound != null)
|
||||||
{
|
{
|
||||||
@ -64,9 +72,10 @@ public class AudioChanger : MonoBehaviour
|
|||||||
}
|
}
|
||||||
|
|
||||||
private void OnTriggerEnter(Collider other) {
|
private void OnTriggerEnter(Collider other) {
|
||||||
|
aSourse.volume = _startVolume ;
|
||||||
if(other.gameObject.GetComponent<ProjectileController>() != null)
|
if(other.gameObject.GetComponent<ProjectileController>() != null)
|
||||||
{
|
{
|
||||||
aSourse.volume = _startVolume ;
|
|
||||||
var damage = other.gameObject.GetComponent<ProjectileController>().damage;
|
var damage = other.gameObject.GetComponent<ProjectileController>().damage;
|
||||||
switch (damage)
|
switch (damage)
|
||||||
{
|
{
|
||||||
|
@ -64,9 +64,20 @@ public class PlayerState : MonoBehaviour
|
|||||||
private void Update()
|
private void Update()
|
||||||
{
|
{
|
||||||
AddTowerEnemy();
|
AddTowerEnemy();
|
||||||
|
AddNewEnemies(enemies.Count);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private void AddNewEnemies(int amount)
|
||||||
|
{
|
||||||
|
if (amount == 0)
|
||||||
|
{
|
||||||
|
var newEnemy = GameObject.Find("Player");
|
||||||
|
if (newEnemy != null)
|
||||||
|
{
|
||||||
|
enemies.Add(newEnemy.GetComponent<PlayerState>());
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
private List<PlayerState> AddTowerEnemy()
|
private List<PlayerState> AddTowerEnemy()
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user