コード例 #1
0
ファイル: RespawnScript.cs プロジェクト: Ethirix/ObjectDodger
 private void FireRsEvent()
 {
     if (!restartText.IsActive())
     {
         EventSystem.current.SetSelectedGameObject(null, null);
         btn.enabled = false;
         RespawnEvent?.Invoke();
     }
 }
コード例 #2
0
ファイル: NetworkHealth.cs プロジェクト: GKaszewski/SpeedKill
 public void RpcKill()
 {
     if (photonView.IsMine)
     {
         AudioSource.PlayClipAtPoint(hitSound, transform.position);
         //id.owner.profile.deaths++;
         //id.owner.profile.CalculateKDR();
         RespawnEvent?.Invoke();
         PhotonNetwork.Destroy(gameObject);
     }
 }
コード例 #3
0
    public IEnumerator DeathTransition()
    {
        DeathEvent?.Invoke();
        //  Debug.Log("Start");
        yield return(new WaitForSeconds(PlayerManager._instance.GetPlayerGFX.GetDeathAnimLength));

        // Debug.Log("Player Died");
        UIManager._instance.BlackPanel(true);

        yield return(new WaitForSeconds(extraDelay));

        UIManager._instance.BlackPanel(false);
        RespawnEvent?.Invoke();
        startedDeathEvent = false;
    }
コード例 #4
0
ファイル: Wormhole.cs プロジェクト: nike4613/TshockPLugins
        private void PlayerUpdate(Player player, int i)
        {
            TSPlayer ply = new TSPlayer(i);

            if (ply.UUID == "")
            {
                return;
            }

            if (player.dead && !prevDeadState[i])
            { // Died
                DeathEvent.Invoke(ply);
            }
            if (!player.dead && prevDeadState[i])
            { // Respawned
                RespawnEvent.Invoke(ply);
            }

            prevDeadState[i] = player.dead;
        }
コード例 #5
0
 /// <summary>
 /// Respawn the object.
 /// </summary>
 /// <param name="resetHealth">Should the characters health be reset.</param>
 public void RespawnTarget(bool resetHealth = true)
 {
     m_RespawnEvent.Invoke(resetHealth);
 }