void Start() { wavesManager = WavesManager.Instance; wavesManager.OnWaveNumberChange += WaveLabelChange; WaveLabelChange(wavesManager.WavesState); }
public void Awake() { waveScript = waveManager.GetComponent<WavesManager>(); initLaneBounds(); //Debug.Log("FIRSTBOUNDMIN: " + laneBounds[0].min); //Debug.Log("FIRSTBOUNDMAX: " + laneBounds[0].max); }
private void Awake() { mainMenuBlock = GameObject.FindGameObjectWithTag(Tags.MainMenuBlock); pauseBlock = GameObject.FindGameObjectWithTag(Tags.PauseBlock); cameraController = GameObject.FindGameObjectWithTag(Tags.MainCamera).GetComponent <CameraController>(); waveManager = GameObject.FindGameObjectWithTag(Tags.WavesManager).GetComponent <WavesManager>(); enemySpawner = GameObject.FindGameObjectWithTag(Tags.EnemiesSpawner).GetComponent <EnemySpawner>(); }
// ottiene le istanze dei sotto-moduli di games manager: wavesmanager, scoremanager etc. etc. void getSubManagerModulesIstances() { wavesManager = GameObject.FindGameObjectWithTag("WavesManager").GetComponent <WavesManager>(); scoreManager = GameObject.FindGameObjectWithTag("ScoreManager").GetComponent <ScoreManager>(); upgradesManager = GameObject.FindGameObjectWithTag("UpgradesManager").GetComponent <UpgradesManager>(); mainHUDManager = GameObject.FindGameObjectWithTag("MainHUD").GetComponent <MainHUDManager>(); healsManager = GameObject.FindGameObjectWithTag("HealsManager").GetComponent <HealsManager>(); }
void Awake() { if (_instance != null) { Debug.LogError("More than one instance of a singleton detected"); return; } _instance = this; }
void Awake() { if (instance != null) { Debug.Log("Another instance of WavesManager already exists !"); } instance = this; }
public override void OnInspectorGUI() { DrawDefaultInspector(); WavesManager manager = (WavesManager)target; if (GUILayout.Button("Generate wave file")) { manager.GenerateWave(); } }
void Awake() { if (instance == null) { instance = this; } else { Debug.LogError("Duplicated WavesManager", gameObject); } }
// Use this for initialization protected void Start() { zombieSpawner = FindObjectOfType <ZombieSpawner>(); wavesManager = FindObjectOfType <WavesManager>(); aliveZombies.Add(this); SetUpGame.MakeSmaller(gameObject); CreateZombie(); player = FindObjectOfType <PlayerAttack>(); rigidBody2d = GetComponent <Rigidbody2D>(); InvokeRepeating("CheckForSamePosZombies", 4.765f, 5f); }
int currentWave; //Vague actuellement jouee //Initialisation void Awake() { _Instance = this; finishedWaves = new bool[waves.Count]; for (int i = 0; i < finishedWaves.Length; i++) { finishedWaves[i] = false; } currentWave = 0; waveCount.text = "Préparez-vous !"; }
void Start() { wavesManager = WavesManager.Instance; startWaveButtons = new List <StartWaveButton>(); for (int i = 0; i < ownTransform.childCount; i++) { Transform child = ownTransform.GetChild(i); StartWaveButton startWaveButton = child.GetComponent <StartWaveButton>(); if (startWaveButton != null) { startWaveButtons.Add(startWaveButton); } } }
public override void OnInspectorGUI() { WavesManager spawn = (WavesManager)target; if (DrawDefaultInspector()) { // spawn.RotateLeft(); } int num = 0; float time = 0; foreach (WavesManager.Waves w in spawn.wavesPattern) { w.id = "Waves n°" + num++; w.time = time; time += w.duration; //if(w.current) } }
public static void BeginWaveEditing(GameObject spawnpoint, WavesManager wavesmanager) { EditorSceneManager.SaveOpenScenes(); if (spawnpoint == null) { Debug.Log("Need a spawnpoint to edit"); return; } if (wavesmanager == null) { Debug.Log($"Must have one component <{nameof(WavesManager)}> attached"); return; } //Pre-setup for wave editor scene. GameObject spawnobjectcopy = WaveEditorHelper.BuildBareMeshCopy(spawnpoint); spawnobjectcopy.name = "Spawn-Preview"; spawnobjectcopy.AddComponent <ImmutableGameObject>(); spawnobjectcopy.transform.position = spawnpoint.transform.position; spawnobjectcopy.transform.rotation = spawnpoint.transform.rotation; HideAllObjectsExcept(spawnobjectcopy); Selection.activeGameObject = spawnobjectcopy; SceneView.lastActiveSceneView.FrameSelected(); var editorgui = new WaveEditorSceneContext(spawnobjectcopy, wavesmanager.WavesContainer, () => { RestoreOriginalScene(); GameObject.DestroyImmediate(spawnobjectcopy); }); }
private void Awake() { instance = this; }
void Start() { wavesManager = WavesManager.Instance; }
void Awake() { Instance = this; waves = FindObjectOfType <WavesManager>(); }
void Start() { wavesManager = WavesManager.Instance; button.onClick.AddListener(wavesManager.StartWave); PrepareCicrleBar(); }
private void Awake() { cameraController = GameObject.FindGameObjectWithTag(Tags.MainCamera).GetComponent <CameraController>(); brain = GameObject.FindGameObjectWithTag(Tags.Brain); waveManager = GameObject.FindGameObjectWithTag(Tags.WavesManager).GetComponent <WavesManager>(); }