void StartSummoningAncientSlime() { TopNotification.Push("...Something is wrong, what is the device at center?", MyColor.Red, 3f); Animator AncientBossSpawnerAnim = BossSpawner.transform.GetComponent <Animator>(); AncientBossSpawnerAnim.SetTrigger("Spawn"); AudioSource.PlayClipAtPoint(Roar, transform.position, GameManager.SFX_Volume); }
//private void SyncPositionUpdate() { // if (PositionSyncCounter < PositionSyncInterval) { // PositionSyncCounter += Time.deltaTime; // } else { // Client.Send(Protocols.UpdatePlayerPosition, new PositionData(Client.ClientID, Position)); // PositionSyncCounter = 0; // } //} protected override void Die() { base.Die(); MainCamera.transform.parent = null; TopNotification.Push("Your soul is fading...", MyColor.Red, 3f); Destroy(transform.gameObject, 4f); Scene.LoadWithDelay(ID.Developing, 5f); }
void Waiting() { if (MPC == null) { MPC = GameObject.Find("MainPlayer").GetComponent <MainPlayer>(); } if (MPC.InteractTarget == null && ControllerManager.SyncActions && ControllerManager.Actions.Submit.WasPressed) { TopNotification.Push("More slimes are coming!", MyColor.Orange, 2f); WaitTimer = 0; LastWaitTimer = 0; AllowWait = false; AllowSpawn = true; return; } if (WaitTimer == 0) { TopNotification.Push((WaitInterval).ToString("F0"), MyColor.Yellow, WaitInterval); } if (WaitTimer - LastWaitTimer >= 1) { //TopNotification.Push((WaitInterval-WaitTimer).ToString("F0"), MyColor.Yellow, 1f); TopNotification.Message = (WaitInterval - WaitTimer).ToString("F0"); LastWaitTimer = WaitTimer; } if (WaitTimer < WaitInterval) { WaitTimer += Time.deltaTime; } else { TopNotification.Push("More slimes are coming!", MyColor.Orange, 2f); WaitTimer = 0; LastWaitTimer = 0; AllowWait = false; AllowSpawn = true; } }
private void TopNotify(Decipher decipher) { TopNotifyData temp = JsonUtility.FromJson <TopNotifyData>(decipher.content); TopNotification.Push(temp.message, temp.color, temp.period); }
protected override void Start() { base.Start(); TopNotification.Push("~ " + Scene.Current_Name + " ~", MyColor.White, 3f); }