Exemplo n.º 1
0
 void NPC_AI_Died(GameObject deadUnit, UnitDiedEventArgs e)
 {
     Destroy(this);
     if (deadUnit)
     {
         Util.Destroy(deadUnit.GetComponents<NPC_BehaviorState>());
         currentState = null;
     }
 }
 void PlayerStatTracker_Died(GameObject deadUnit, UnitDiedEventArgs e)
 {
     deaths++;
 }
Exemplo n.º 3
0
 void NPCStats_Died(GameObject deadUnit, UnitDiedEventArgs e)
 {
     Destroy(this.gameObject, 4.0f);
 }
Exemplo n.º 4
0
 private void OnDeath(UnitDiedEventArgs unitDiedEventArgs)
 {
     if (Network.isServer)
     {
         networkView.RPC("NotifyDeath", RPCMode.All, unitDiedEventArgs.deathPosition, unitDiedEventArgs.killer.GetNetworkViewID(), unitDiedEventArgs.reward.experience, unitDiedEventArgs.reward.gold);
     }
 }
Exemplo n.º 5
0
 private void Died_RewardPlayers(GameObject deadUnit, UnitDiedEventArgs e)
 {
     RewardPlayersInArea(e.deathPosition, e.killer, e.reward);
 }
Exemplo n.º 6
0
    protected virtual void NotifyDeath(Vector3 deathPosition, NetworkViewID killer, int experience, int gold)
    {
        var e = new UnitDiedEventArgs() { reward = new KillReward(experience, gold), killer = killer.GetGameObject(), deathPosition = deathPosition };
        if (Died != null)
        {
            Died(gameObject, e);
        }

        killer.GetGameObject().GetCharacterStats().OnKilledUnit(new UnitKilledEventArgs() { deadUnit = this.gameObject, deathPosition = deathPosition });
    }
Exemplo n.º 7
0
 void RelicHolder_Died(GameObject deadUnit, UnitDiedEventArgs e)
 {
     networkView.RPC("CommitDropRelic", RPCMode.All);
 }
Exemplo n.º 8
0
 void GuardStats_Died(GameObject deadUnit, UnitDiedEventArgs e)
 {
     ShowDyingAnimation();
     Destroy(this.gameObject, 10f);
 }
Exemplo n.º 9
0
 void NPC_Died(GameObject sender, UnitDiedEventArgs e)
 {
     NPCs.Remove(FindRecord(sender));
 }
 void NPCGenericAnimation_Died(GameObject deadUnit, UnitDiedEventArgs e)
 {
     StartDyingAnimation();
 }
Exemplo n.º 11
0
 void EnemySearcher_Died(GameObject deadUnit, UnitDiedEventArgs e)
 {
     if (enemiesNearby.Contains(deadUnit.gameObject))
         enemiesNearby.Remove(deadUnit.gameObject);
 }
Exemplo n.º 12
0
    void PlayerDied(GameObject sender, UnitDiedEventArgs e)
    {
        SetRespawnTimer();
        StartCoroutine(TimedDeathAnimation());

        if (gameObject.IsMyLocalPlayer())
        {
            PopupMessage.Display("You were killed by " + e.killer.name);
            gameObject.DisableControls();
            Camera.main.gameObject.GetComponent<BlurEffect>().enabled = true;
            Invoke("EnableRespawnCamera", 6.0f);
            return;
        }
        else
        {
            transform.FindChild("Name Label").GetComponent<CharacterLabel>().DisableLabels();
            if (Util.MyLocalPlayerObject.GetCharacterStats().TeamNumber != this.teamNumber)
            {
                PopupMessage.LocalDisplay(gameObject.name + " has been killed by " + e.killer.name + "!", 2.5f, 0, 1, 0);
            }
            else
            {
                PopupMessage.LocalDisplay(gameObject.name + " has been killed by " + e.killer.name + "!", 2.5f, 1, 0, 0);
            }
        }
    }
Exemplo n.º 13
0
 void DeathEvent_Died(GameObject deadUnit, UnitDiedEventArgs e)
 {
     DeathEvent();
 }
Exemplo n.º 14
0
 void characterStats_Died(GameObject deadUnit, UnitDiedEventArgs e)
 {
     this.enabled = false;
 }