Голоса для всех.

This commit is contained in:
DyatelO 2021-11-30 17:17:27 +03:00
parent c1394bae52
commit 0e5411bb52
2 changed files with 331 additions and 14 deletions

View File

@ -1426,6 +1426,158 @@ Transform:
m_Father: {fileID: 393765199}
m_RootOrder: 0
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &507719627
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 507719630}
- component: {fileID: 507719629}
- component: {fileID: 507719628}
m_Layer: 0
m_Name: Voices (2)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!82 &507719628
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 507719627}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: -6241634536419500954, guid: 5b71a1e2cfc04854a866ea6c6c092898,
type: 2}
m_audioClip: {fileID: 8300000, guid: 2a383482135175741bfbff39772edaee, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &507719629
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 507719627}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a12c2d538046f654f840184e9326eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
dictor:
- {fileID: 8300000, guid: 2a383482135175741bfbff39772edaee, type: 3}
- {fileID: 8300000, guid: c905266e868a02c4f83180768a534375, type: 3}
- {fileID: 8300000, guid: 843701470ff70894c84132c4fd61c4f8, type: 3}
- {fileID: 8300000, guid: 9a78b95f785f72f4b8f46aa9a8eb1722, type: 3}
- {fileID: 8300000, guid: a19c2c5c05f035b4cac6ccf0cebf64e1, type: 3}
- {fileID: 8300000, guid: f3fdaa6a581302649a10233f34c0f427, type: 3}
- {fileID: 8300000, guid: 6d9e1616328f3884591d2c3415ef64bb, type: 3}
- {fileID: 8300000, guid: 3a5b757866fa91549b518afd182e8bf4, type: 3}
- {fileID: 8300000, guid: 4fdd725a2355b3448b7e2b98e4527532, type: 3}
aSoursce: {fileID: 507719628}
--- !u!4 &507719630
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 507719627}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 7
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &526352757
GameObject:
m_ObjectHideFlags: 0
@ -4746,6 +4898,158 @@ Transform:
type: 3}
m_PrefabInstance: {fileID: 1726069082}
m_PrefabAsset: {fileID: 0}
--- !u!1 &1733355522
GameObject:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
serializedVersion: 6
m_Component:
- component: {fileID: 1733355525}
- component: {fileID: 1733355524}
- component: {fileID: 1733355523}
m_Layer: 0
m_Name: Voices (3)
m_TagString: Untagged
m_Icon: {fileID: 0}
m_NavMeshLayer: 0
m_StaticEditorFlags: 0
m_IsActive: 0
--- !u!82 &1733355523
AudioSource:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733355522}
m_Enabled: 1
serializedVersion: 4
OutputAudioMixerGroup: {fileID: -6241634536419500954, guid: 5b71a1e2cfc04854a866ea6c6c092898,
type: 2}
m_audioClip: {fileID: 8300000, guid: 2a383482135175741bfbff39772edaee, type: 3}
m_PlayOnAwake: 0
m_Volume: 1
m_Pitch: 1
Loop: 0
Mute: 0
Spatialize: 0
SpatializePostEffects: 0
Priority: 128
DopplerLevel: 1
MinDistance: 1
MaxDistance: 500
Pan2D: 0
rolloffMode: 0
BypassEffects: 0
BypassListenerEffects: 0
BypassReverbZones: 0
rolloffCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
- serializedVersion: 3
time: 1
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
panLevelCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
spreadCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 0
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
reverbZoneMixCustomCurve:
serializedVersion: 2
m_Curve:
- serializedVersion: 3
time: 0
value: 1
inSlope: 0
outSlope: 0
tangentMode: 0
weightedMode: 0
inWeight: 0.33333334
outWeight: 0.33333334
m_PreInfinity: 2
m_PostInfinity: 2
m_RotationOrder: 4
--- !u!114 &1733355524
MonoBehaviour:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733355522}
m_Enabled: 1
m_EditorHideFlags: 0
m_Script: {fileID: 11500000, guid: a12c2d538046f654f840184e9326eac1, type: 3}
m_Name:
m_EditorClassIdentifier:
dictor:
- {fileID: 8300000, guid: 2a383482135175741bfbff39772edaee, type: 3}
- {fileID: 8300000, guid: c905266e868a02c4f83180768a534375, type: 3}
- {fileID: 8300000, guid: 843701470ff70894c84132c4fd61c4f8, type: 3}
- {fileID: 8300000, guid: 9a78b95f785f72f4b8f46aa9a8eb1722, type: 3}
- {fileID: 8300000, guid: a19c2c5c05f035b4cac6ccf0cebf64e1, type: 3}
- {fileID: 8300000, guid: f3fdaa6a581302649a10233f34c0f427, type: 3}
- {fileID: 8300000, guid: 6d9e1616328f3884591d2c3415ef64bb, type: 3}
- {fileID: 8300000, guid: 3a5b757866fa91549b518afd182e8bf4, type: 3}
- {fileID: 8300000, guid: 4fdd725a2355b3448b7e2b98e4527532, type: 3}
aSoursce: {fileID: 1733355523}
--- !u!4 &1733355525
Transform:
m_ObjectHideFlags: 0
m_CorrespondingSourceObject: {fileID: 0}
m_PrefabInstance: {fileID: 0}
m_PrefabAsset: {fileID: 0}
m_GameObject: {fileID: 1733355522}
m_LocalRotation: {x: 0, y: 0, z: 0, w: 1}
m_LocalPosition: {x: 0, y: 0, z: 0}
m_LocalScale: {x: 1, y: 1, z: 1}
m_Children: []
m_Father: {fileID: 0}
m_RootOrder: 8
m_LocalEulerAnglesHint: {x: 0, y: 0, z: 0}
--- !u!1 &1743009244
GameObject:
m_ObjectHideFlags: 0
@ -4822,7 +5126,8 @@ MonoBehaviour:
life: {fileID: 1801060037}
health: {fileID: 1801060027}
player: {fileID: 1801060036}
Ragnar: {fileID: 0}
Ragnar:
- {fileID: 0}
playerSource: {fileID: 1372123122}
botSource: {fileID: 2117650915}
players: []

View File

@ -13,27 +13,31 @@ public class SaySomething : MonoBehaviour
//[SerializeField] private GameManager manager;
[SerializeField] private HealthController health;
[SerializeField] MainWeapon player;
[SerializeField] SwitchWeapon Ragnar;
[SerializeField] List<SwitchWeapon> Ragnar;
//[SerializeField] SwitchWeapon Ragnar;
//[SerializeField] List<AI_BotController> bot;
[SerializeField] private AudioSource playerSource;
[SerializeField] private AudioSource botSource;
[SerializeField] private List<PlayerState> players;
private string nameing = "Ragnar(Clone)";
private int startlives;
public static float healthCount;
public static MainWeapon mainWeapon;
public static SwitchWeapon staticswitch;
//public static List<AI_BotController> bostatic;
void Start()
{
mainWeapon = player;
healthCount = health.currentHealth;
//staticswitch = Ragnar;
//bostatic = bot;
//players = new List<PlayerState>(FindObjectsOfType<PlayerState>());
//startPlayersCount = players.Count;
startlives = Extralife.staticLives;
startlives = new List<SwitchWeapon>( FindObjectsOfType<SwitchWeapon>()).Count;
//startlives = Extralife.staticLives;
@ -45,20 +49,28 @@ public class SaySomething : MonoBehaviour
player = FindObjectOfType<MainWeapon>();
if(player == null)
{
VoiceEnable.isDisable = true;
//VoiceEnable.isDisable = true;
//playerSource.Play();
}
else
VoiceEnable.isDisable = false;
//VoiceEnable.isDisable = false;
Ragnar = FindObjectOfType<SwitchWeapon>();
if(Ragnar == null)
{
VoiceEnable.isAiDisabled = true;
//playerSource.Play();
}
else
VoiceEnable.isAiDisabled = false;
Ragnar = new List<SwitchWeapon>( FindObjectsOfType<SwitchWeapon>());
//Ragnar = FindObjectOfType<SwitchWeapon>();
//if(Ragnar.name == nameing)
//{
//foreach(SwitchWeapon sw in Ragnar)
//{
if(Ragnar.Count < startlives)
{
VoiceEnable.isAiDisabled = true;
//playerSource.Play();
}
else
VoiceEnable.isAiDisabled = false;
//}
//}
/*
bot = new List<AI_BotController>( FindObjectsOfType<AI_BotController>());
foreach(AI_BotController ai in bot)