示例#1
0
    public static Animator SpawnBody( Vector3 position, bool isFacingRight, DeathType type = DeathType.Invalid )
    {
        if( instance )
            return instance.internalSpawnBody( position, isFacingRight, type );

        return null;
    }
 public Player(Point position)
     : base(new Point(0, 0), position, false, true)
 {
     this.facingDirection = 0;
     this.isDying = false;
     this.typeOfDeath = DeathType.Generic;
 }
示例#3
0
    private Animator internalSpawnBody( Vector3 position, bool isFacingRight, DeathType type )
    {
        if( body == null )
            return null;

        GameObject temp = Instantiate( body, position, Quaternion.identity ) as GameObject;

        temp.transform.parent = transform;

        if( isFacingRight )
            temp.transform.localScale = new Vector3( temp.transform.localScale.x * -1f, temp.transform.localScale.y, temp.transform.localScale.z );

        bodies.Add( temp );

        if( bodies.Count > maxNumBodies )
            bodies.RemoveAt( 0 );

        if( type == DeathType.Invalid )
            return null;

        Animator animator = temp.GetComponentInChildren<Animator>();

        if( animator == null )
            return null;

        animator.SetInteger( "deathType", (int)type );

        return animator;
    }
 public BoxEntity(Point position, bool isLightBox)
     : base(new Point(0, 0), position, false, true)
 {
     this.isDying = false;
     this.typeOfDeath = DeathType.Generic;
     this.isLightBox = isLightBox;
     if (isLightBox)
     {
         texture = new Point(1, 0);
         isLightOn = false;
     }
 }
示例#5
0
    public void KillPlayer(Vector2DInt tilePos, DeathType type)
    {
        Tile tile = Match.instance.level.tileMap.GetTile(tilePos);

        tile.PlaySound(TileSounds.Kill);

        if (type == DeathType.Sink)
        {
            Timing.RunCoroutineSingleton(_sink(), gameObject.GetInstanceID(), SingletonBehavior.Overwrite);
        }
        else if (type == DeathType.Quicksand)
        {
            Timing.RunCoroutineSingleton(_quicksand(), gameObject.GetInstanceID(), SingletonBehavior.Overwrite);
        }
        else if (type == DeathType.Mine)
        {
            Timing.RunCoroutineSingleton(_Explode(tile), gameObject.GetInstanceID(), SingletonBehavior.Overwrite);
        }
    }
示例#6
0
    public void Initialize()
    {
        bodyParts = GetComponentsInChildren <CorpsePart>();

        int count = bodyParts.Length;

        for (int i = 0; i < count; i++)
        {
            bodyParts[i].Initialize();
        }


        if (randomDeathType)
        {
            deathType = (DeathType)Random.Range(0, System.Enum.GetValues(typeof(DeathType)).Length);
        }

        Destroy(gameObject, 5f);
    }
示例#7
0
    public void RemoveAnimal(Hawk hawk, DeathType type)
    {
        hawkCount--;

        switch (type)
        {
        case DeathType.Hunger:
            hawkStats.hungerDeath++;
            break;

        case DeathType.Thirst:
            hawkStats.thirstDeath++;
            break;

        case DeathType.Fire:
            hawkStats.fireDeath++;
            break;
        }
    }
示例#8
0
        public override void DoDamage(DamageType damageType, Fix64 amount, DeathType deathType, TimeInterval time)
        {
            // TODO: Don't think this is right.
            if (damageType == DamageType.Unresistable)
            {
                Health -= amount;

                if (Health < (Fix64)0)
                {
                    Health = (Fix64)0;
                }

                // TODO: DamageFX

                if (Health <= Fix64.Zero)
                {
                    GameObject.Die(deathType, time);
                }
            }
        }
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    //	* New Method: Reduce Health
    //~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    public void ReduceHealth(int iReductionCost, DeathType eDeathType, Vector2 vImpactObjectPosition)
    {
        if (!Hurtable)
        {
            return;
        }

        m_iHealth -= iReductionCost;
        if (m_iHealth < 1)
        {
            m_bIsAlive = false;
            PlayDeathAnimation(eDeathType);
            OnDeath();
        }
        else
        {
            m_bTempInvincibility = true;
            RunDamageJumpIndication(vImpactObjectPosition.x);
        }
    }
示例#10
0
    public void DeathParticles(DeathType deathType)
    {
        switch (deathType)
        {
        case DeathType.Normal:
            PlayParticleSystem(normalDeathParticles);
            break;

        case DeathType.Fire:
            PlayParticleSystem(fireDeathParticles);
            break;

        case DeathType.Ice:
            PlayParticleSystem(IceDeathParticles);
            break;

        case DeathType.Posion:
            PlayParticleSystem(poisonDeathParticles);
            break;
        }
    }
示例#11
0
    void DestroyPlayer(DeathType type)
    {
        StopVibrating();
        _soundModule.PlayDeathSound();

        var deathPartID   = SimpleParticleSpawner.ParticleID.PLAYER_DEATH;
        var deathParticle = SimpleParticleSpawner.Instance.particles[deathPartID].GetComponentInChildren <ParticleSystem>();

        SimpleParticleSpawner.Instance.SpawnParticle(deathParticle.gameObject, transform.position, transform.forward);

        _cam.OnPlayerDeath(type);

        EventManager.Instance.DispatchEvent(PlayerEvents.Death, this, type, isPushed, gameObject.tag);
        _rb.velocity = Vector3.zero;
        gameObject.SetActive(false);

        //Iván si se rompe algo perdón
        lastMovement     = Vector3.zero;
        lastAnimMovement = Vector3.zero;
        lastDir          = Vector3.zero;
    }
示例#12
0
    private void Death(DeathType type)
    {
        died = true;

        switch (type)
        {
        case (DeathType.Explode):
            anim.SetExplode();
            Debug.Log("Exploded!");
            break;

        case (DeathType.Impale):
            anim.SetImpaled();
            Debug.Log("Impaled");
            break;

        case (DeathType.Hang):
            anim.SetHang_Death();
            DoHang();
            break;

        case (DeathType.Electricuted):
            anim.SetElectricuted();
            break;

        case (DeathType.Tripped):
            anim.SetTrip();
            break;

        case (DeathType.Spider):
            anim.SetSpider();
            break;

        default:
            Debug.Log("Exploded!");
            break;
        }
        Debug.Log(string.Format("Player died because of {0}", type.ToString()));
    }
示例#13
0
    //=========================  Function - Die()  =====================================//
    public void Die(DeathType deathType)
    {
        if (!invincibleForTheSakeOfDebugging)
        {
            playerIsActive = false;
            playerLivesRemaining--;

            switch (deathType)
            {
            case DeathType.collision:
                audioSrc.clip = sounds.deathCollision;
                break;

            case DeathType.drowning:
                audioSrc.clip = sounds.deathDrowning;
                break;

            case DeathType.chompChompChomp:
                audioSrc.clip = sounds.chomp;
                break;

            default:
                audioSrc.clip = sounds.deathCollision;
                break;
            }

            audioSrc.Play();

            if (playerLivesRemaining >= 0)
            {
                StartCoroutine(Respawn());
                lifeIMGs[playerLivesRemaining].gameObject.SetActive(false);
            }
            else
            {
                gameManager.OpenDeathMenu();
            }
        }
    }
示例#14
0
    public static void reportDeath(DeathType type)
    {
        spawner.SpawnStickFigure();
        switch ((int)type)
        {
        case 0:
            deathsBurn += 1;
            break;

        case 1:
            deathsDrown += 1;
            break;

        case 2:
            deathsFall += 1;
            break;

        default:
            break;
        }

        StatsText.instance.UpdateText();
    }
示例#15
0
    public void RemoveAnimal(Monkey monkey, DeathType type)
    {
        monkeyCount--;

        switch (type)
        {
        case DeathType.Hunt:
            monkeyStats.huntDeath++;
            break;

        case DeathType.Hunger:
            monkeyStats.hungerDeath++;
            break;

        case DeathType.Thirst:
            monkeyStats.thirstDeath++;
            break;

        case DeathType.Fire:
            monkeyStats.fireDeath++;
            break;
        }
    }
示例#16
0
    public void TriggerDeath(DeathType deathType)
    {
        if (PlayerLocked)
        {
            return;
        }

        bool isFirstDeath = currencyManager.GetDeathCount(deathType) == 0;

        currencyManager.AddDeath(deathType);

        events.TriggerEvent(EventManager.EventType.Death, deathType.name);

#if UNITY_EDITOR
        if (NeverDie)
        {
            return;
        }
#endif

        deathScreen.DisplayDeathType(deathType, isFirstDeath);
        PlayerLocked = true;
    }
示例#17
0
    private string GetQuip(DeathType deathType)
    {
        switch (deathType)
        {
        case DeathType.Fish:
        {
            int randomQuip = Random.Range(0, fishQuips.Length);
            return(fishQuips[randomQuip]);

            break;
        }

        case DeathType.Air:
        {
            int randomQuip = Random.Range(0, airQuips.Length);
            return(airQuips[randomQuip]);

            break;
        }
        }

        return("Couldn't keep your head above water!");
    }
示例#18
0
        public void die(DeathType deathType = DeathType.Damage)
        {
                        #if UNITY_EDITOR
            if (!Application.isPlaying)
            {
                Debug.LogWarning("Dino death not available in editor");
                return;
            }
                        #endif
            usesInput   = false;
            rigidBodies = transform.GetComponentsInChildren <Rigidbody2D>();
            switch (deathType)
            {
            case DeathType.Damage:
                disassemble();
                //aud_death.playClip();
                break;

            case DeathType.Time:
                goto case DeathType.Meteor;

            case DeathType.Meteor:
                explode();
                break;

            case DeathType.Lava:
                //disassemble();
                break;

            default:
                goto case DeathType.Meteor;
            }
            isAlive = false;
            Camera.main.GetComponent <Timer>().section = Timer.Section.Post;
            _health = 0;
        }
 public static void BroadcastDeath(DeathType deathType)
 {
     GlobalMessenger <DeathType> .FireEvent(EventNames.QSBPlayerDeath, deathType);
 }
	//Called only on the client where the player died.
	void LostPlayer(Controller2D controller, DeathType deathType){
		int deathTypeInteger = (int)deathType;
		if(Network.isServer){
			//pass network.time because it's going to be adjusted to synched time anyway
			NotifyOthersOfDeath(Network.player, (float)Network.time, deathTypeInteger);
		}
		
		else {
			SessionManager.Instance.psInfo.GetPlayerStats(Network.player).timeOfDeath = TimeManager.instance.time;
			networkView.RPC ("NotifyServerOfDeath", RPCMode.Server, deathTypeInteger);
		}
		
		//bring up the dead player placement screen.
		//placementUI.SwitchToLive(true);
		//placementUI.enabled = true;
	}
示例#21
0
 public GameStatus(bool alive = false, DeathType death = DeathType.NONE, RoleType co = RoleType.NONE)
 {
     _alive      = alive;
     _death_type = death;
     _co_data    = co;
 }
示例#22
0
文件: Player.cs 项目: zmthy/play-dead
        public void OnKilled(String killedBy, DeathType killedType)
        {
            isAlive = false;

            if (!deathPlayed)
            {
                switch (killedType)
                {
                    case DeathType.Default:
                        killedSound.Play();
                        break;
                    case DeathType.Water:
                        waterDrownSound.Play();
                        break;
                    case DeathType.Fall:
                        fallImpactSound.Play();
                        break;
                    case DeathType.Spike:
                        spikeImpaleSound.Play();
                        break;
                    default:
                        killedSound.Play();
                        break;
                }

                deathPlayed = true;
            }

            if (isRight || velocity.X > 0)
            {
                if (killedType == DeathType.Water)
                {
                    sprite.PlayAnimation(drownRightAnimation);
                }
                else
                {
                    sprite.PlayAnimation(dieRightAnimation);
                }
            }
            else
            {
                if (killedType == DeathType.Water)
                {
                    sprite.PlayAnimation(drownLeftAnimation);
                }
                else
                {
                    sprite.PlayAnimation(dieLeftAnimation);
                }
            }
            //TODO: pan the camera + new death animations
        }
示例#23
0
 internal bool IsApplicable(DeathType deathType) => _moduleData.DeathTypes?.Get(deathType) ?? false;
 public static void Reset()
 {
     position = -Config.screenH;
     rect.Y = (int)position;
     initialized = false;
     velocity = 0;
     CheckHighScore();
     Input.spaceBarPreventativeMeasureFlag = false;
     death = DeathType.none;
     //MenuSystem.Reset();
 }
示例#25
0
 protected virtual void Die(DeathType type)
 {
     //TODO: EventManager.Instance.OnEnemyDie();
     Destroy(gameObject);
 }
示例#26
0
 internal override void OnDie(BehaviorUpdateContext context, DeathType deathType)
 {
     _gameObject.Destroy();
 }
示例#27
0
 public virtual void DoDamage(DamageType damageType, Fix64 amount, DeathType deathType, TimeInterval time)
 {
 }
	//Called only on the client where the player died.
	void LostPlayer(Controller2D deadPlayer, DeathType deathType){
		int deathTypeInteger = (int)deathType;
	
		if(Network.isServer){
			//pass network.time because it's going to be adjusted to synched time anyway
			NotifyOthersOfDeath(Network.player, TimeManager.instance.time , deathTypeInteger);
		}

		else {
			networkView.RPC ("NotifyServerOfDeath", RPCMode.Server, TimeManager.instance.time,  deathTypeInteger);

			//Do some of the things destroyplayerclone does
			if(deadPlayer.Lives_LOCAL == 0){
				sessionManager.psInfo.GetPlayerStats(Network.player).timeOfDeath = TimeManager.instance.time;
			}

			sessionManager.psInfo.GetPlayerStats(Network.player).lives = deadPlayer.Lives_LOCAL;
			livesUI.DecreaseLives(Network.player, deadPlayer.Lives_LOCAL); //decrease lives in local ui
		}

		if(deadPlayer.Lives_LOCAL == 0){
			//bring up the dead player placement screen.
			placementUI.disabledPowers.Add(PowerType.GATE);
			placementUI.disabledPowers.Add(PowerType.DEFLECTIVE);
			placementUI.SwitchToLive(true);
			placementUI.enabled = true;
		}
	}
示例#29
0
 public void die(DeathType deathType = DeathType.Damage)
 {
     #if UNITY_EDITOR
     if(!Application.isPlaying)
     {
         Debug.LogWarning("Dino death not available in editor");
         return;
     }
     #endif
     usesInput = false;
     rigidBodies = transform.GetComponentsInChildren<Rigidbody2D>();
     switch(deathType)
     {
         case DeathType.Damage:
             disassemble();
             //aud_death.playClip();
             break;
         case DeathType.Time:
             goto case DeathType.Meteor;
         case DeathType.Meteor:
             explode();
             break;
         case DeathType.Lava:
             //disassemble();
             break;
         default:
             goto case DeathType.Meteor;
     }
     isAlive = false;
     Camera.main.GetComponent<Timer>().section = Timer.Section.Post;
     _health = 0;
 }
示例#30
0
 public void Kill(DeathType type)
 {
     isDying = true;
     deathTimer = 0;
     typeOfDeath = type;
     isStatic = true;
     if (type == DeathType.Burn)
         GameClient.PlaySoundEffect(GameClient.sndBurn);
     else if (type == DeathType.Drown)
         GameClient.PlaySoundEffect(GameClient.sndDrown);
     else if (type == DeathType.Fall)
         GameClient.PlaySoundEffect(GameClient.sndFall);
 }
 //
 // OnPlayerKill
 //
 public virtual void OnPlayerKill( GameObject killer, GameObject victim, GameObject weapon, DeathType type )
 {
 }
示例#32
0
        protected ClonedObjectBase()
        {
            DamageByMurderer = 0.0f;
            Faction = -1;
            LastServerUpdate = 0;
            TimeOfDeath = 0;
            HbOnReceiveHit = 0;
            HbOnDoHit = 0;
            HbCollision = 0;
            HbDeath = 0;
            HbKill = 0;
            HbStealth = 0;
            HbCancelSkills = 0;
            StatusBitField = 0;
            Scale = 1.0f;
            GameMass = 0.0f;
            Value = 0;
            CustomValue = -1;
            DeathType = DeathType.Silent;
            HPSkillScalar = 0.0f;
            HPSkillAdd = 0;
            RequiredLevelPrefixOffset = 0;
            RequiredLevel = -1;
            CoidCustomizedBy = -1L;
            MadeFromMemory = false;
            DistanceDrawOverride = 0;
            OverheadOffset = 0.0f;
            DamageState = 0;
            MangledName = "";
            COID = new TFID
            {
                Coid = -1L,
                Global = false
            };
            Bf388 &= 0xFFFFFFF0U;
            Bf380 = (Bf380 & 0xFFE22210U) | 0x22210U;
            Position = new Vector3();
            Rotation = new Vector4();
            Velocity = new Vector3();
            AngularVelocity = new Vector3();

            SetDirtyState();

            TriggerEvents = new[] { -1L, -1L, -1L };

            TerrainOffset = 0.0f;
            Murderer = new TFID
            {
                Coid = -1L,
                Global = false
            };
        }
示例#33
0
        public void BeSquashed(GameObject squasher, DeathType deathType)
        {
            Die(deathType);

            if (HoldingRelic != null)
            {
                HoldingRelic.DropAtPlayer();
                HoldingRelic = null;
            }
        }
示例#34
0
 public void SetDeathType(DeathType deathType)
 {
     this.DeathType = deathType;
 }
示例#35
0
    IEnumerator Coroutine_DeathFadeScene(Animation behind_plane_animation, SpriteRenderer player_main_renderer, Transform visuals_transform, DeathType death_type = DeathType.NO_HEALTH)
    {
        float behind_plane_alpha_value = 0.85f;

        behind_plane_animation.GetComponent <SpriteRenderer>().color = Color.black;
//		CameraManager.instance.SetColorToBehindPlane(Color.black);//too
        //		TweenAlpha.Begin(CameraManager.instance.exploration_plane_behind_player_animation., 2f, 1f);
        Debug.LogWarning("waiting");
        yield return(StartCoroutine(SpecialEffectsManager.instance.Coroutine_StartTweenAlpha(
                                        behind_plane_animation.GetComponent <SpriteRenderer>(),
                                        0f, behind_plane_alpha_value, 2f)));

        //toto
        //yield return StartCoroutine(CameraManager.instance.COROUTINE_ExplorationPlaneBehindToOpaque(2f));
        yield return(new WaitForSeconds(1f));

        SoundManager.instance.PlayIndependant(SoundManager.instance.death_sfx);
        SpecialEffectsManager.instance.moster_transformation_shake.time_ratio = 1 / 4f;
        StartCoroutine(SpecialEffectsManager.instance.moster_transformation_shake.LaunchShake(visuals_transform));
        PlayerExploration.instance.generic_animator.SetBool("IsSick", true);
        yield return(StartCoroutine(SpecialEffectsManager.instance.Coroutine_StartTweenAlpha(
                                        player_main_renderer,
                                        1f, 0f, 2f)));

        yield return(new WaitForSeconds(2f));

        CameraManager.instance.SetColorToFadePlane(Color.black);
        yield return(StartCoroutine(CameraManager.instance.COROUTINE_MainCameraFadeToOpaque(2f)));

//		yield return StartCoroutine(CameraManager.instance.Coroutine_LaunchAnimation(
//			behind_plane_animation,
//			"ToOpaque", 2f
//		));

        if (death_type == DeathType.NATURAL)
        {
            yield return(StartCoroutine(death_scene_action_sequence.Coroutine_NaturalDeath()));
        }
        else
        {
            yield return(StartCoroutine(death_scene_action_sequence.Coroutine_NoHealthDeath()));
        }

        PlayerExploration.instance.generic_animator.SetBool("IsSick", false);
        //apply change

        ApplyDeathChange();
        CameraManager.instance.SetColorToBehindPlane(new Color(0, 0, 0, behind_plane_alpha_value));
        //return to exploration normal state
        //		yield return new WaitForSeconds(0.5f);
        PlayerExploration.instance.main_renderer.color = Color.white;
        yield return(StartCoroutine(CameraManager.instance.COROUTINE_MainCameraFadeToTransparent(3f)));

        yield return(StartCoroutine(CameraManager.instance.Coroutine_LaunchAnimation(
                                        CameraManager.instance.exploration_plane_behind_player_animation,
                                        "ToTransparent", 1f
                                        )));
    }
示例#36
0
 public void DoPlayerDeath(DeathType deathtype)
 {
     // Used for tilting the camera and blacking out the screen.
     deathStart = playerController.getStateStart();
     deathEnd   = playerController.getStateEnd();
 }
示例#37
0
 protected override void Die(DeathType type)
 {
     //TODO: EventManager.Instance.OnEnemyDie(type);
     Destroy(gameObject);
 }
 public static string GetPhrase(DeathType deathType)
 {
     return(DeathDictionary[deathType].OrderBy(x => Guid.NewGuid()).First());
 }
示例#39
0
        public override void DoDamage(DamageType damageType, Fix64 amount, DeathType deathType, TimeInterval time)
        {
            // TODO

            _gameObject.Die(deathType, time);
        }
 public int GetDeathCount(DeathType type)
 {
     return(!deaths.ContainsKey(type) ? 0 : deaths[type]);
 }
示例#41
0
    //
    // OnPlayerKill
    //
    public override void OnPlayerKill( GameObject killer, GameObject victim, GameObject weapon, DeathType type )
    {
        // Do specific things based on how the player died.
        if( type == DeathType.torn )
        {
            // Torn animation.
        }
        else if( type == DeathType.meleed )
        {
            // Meleed animation.
        }
        else if( type == DeathType.hooked )
        {
            // Hooked animation.
        }

        // Kill the player.
        victim.GetComponent<PlayerServerBehaviour>().KillPlayer();

        // Increase the killer's team's score.
        networkView.RPC( "UpdateScore", RPCMode.All, killer.GetComponent<PlayerClientBehaviour>().GetGameData( team ), 1 );
    }
示例#42
0
 public void Die(DeathType dt, long thisTime)
 {
     blockAll(thisTime);
     game.Die(dt);
 }
	public void Die(DeathType deathType = DeathType.CRUSH){

		if(networkController.isOwner && !dead){
			collider2D.enabled = false;
			status.currentStunMeter = 0;
			rigidbody2D.velocity = Vector2.zero;
			circleCollider.sharedMaterial = playerMaterial;

			dead = true;
			locked = true;
			myHook.DestroyHookPossible(Hook.Authority.SERVER);

			Lives_LOCAL--;

			//respawn if we have lives or are in lobby (changing either of these two
			//values in memory would allow for infinite respawns :o)
			wantRespawn = Lives_LOCAL > 0 || LobbyGUI.inLobby;

			//play death animation.
			DeathAnimation(deathType);
           
			if(onDeath != null)
				onDeath(this, deathType);

			if(!wantRespawn && !LobbyGUI.inLobby){
				GameObject.Find("UI-death").GetComponent<UISprite>().enabled = true;
	            GameObject.Find("UI-deathCD").GetComponent<UISprite>().enabled = true;
			}
		}
	}
	public void DieSimple(DeathType deathType, bool respawn = false){
		if(!networkController.isOwner && !dead){
			dead = true;
			boxCollider.enabled = false;
			circleCollider.enabled = false;
			wantRespawn = respawn;
			myHook.DestroyHookPossible(Hook.Authority.SERVER);
			DeathAnimation(deathType);
		}
	}
	void DeathAnimation(DeathType deathType){
		switch(deathType){
		case DeathType.FIRE:
			anim.SetTrigger("FireDeath");
			break;
		case DeathType.PLAGUE:
			anim.SetTrigger("PlagueDeath");
			break;
		case DeathType.EXPLOSION:
			anim.SetTrigger ("ExplosionDeath");
			break;
		case DeathType.RIPPED:
			anim.SetTrigger ("RippedDeath");
			break;
        case DeathType.CRUSH:
            anim.SetTrigger("CrushedDeath");
            break;
		case DeathType.FROZEN:
			anim.SetTrigger("ShatterDeath");
			break;
		default:
			//audio.PlayOneShot(deathSfx);
			anim.SetTrigger("Die"); //not gonna work
			break;
		}
	}
示例#46
0
 public abstract void GetDamage(int damage, DeathType type);
示例#47
0
 public void LaunchDeath(DeathType death_type = DeathType.NO_HEALTH)
 {
     Debug.LogWarning("DEAD");
     SoundManager.instance.PlayIfDifferent(SoundManager.instance.death_music);
     StartCoroutine(Coroutine_LaunchDeathRoutine(death_type));
 }
示例#48
0
 void SetDeathType(DeathType type)
 {
     this.deathType = type;
 }
示例#49
0
        public void Die(DeathType deathType)
        {
            deathPosition = transform.position;

            PlayerInfo.Spawner.Despawn(PlayerNumber);
            PlayerInfo.Spawner.SpawnAfterDelay(PlayerNumber);

            if (deathType == DeathType.Player)
                PlayerDeathEffects();
            else if (deathType == DeathType.Squash)
                SquashDeathEffects();
        }