Beispiel #1
0
    /*
     * Called when the ragdoll is done bringing the body parts back together.
     */
    public void OnBodyRevived()
    {
        reviveTimeout.StopTimer();
        isReviving       = false;
        IsDead           = false;
        collider.enabled = true;

        PigmentBody body = (PigmentBody)playerGeo.GetComponent <PigmentBody> ();

        body.RestoreBody();

        DoBlockClearExplosion();

        GameManager.Instance.OnReviveDone();
    }
Beispiel #2
0
    /*
     * Spawns the player at the specified position
     */
    public void Spawn(Vector3 spawnPosition)
    {
        isWaitingToStart = true;
        IsDead           = false;
        collider.enabled = true;

        PigmentBody body = (PigmentBody)playerGeo.GetComponent <PigmentBody> ();

        body.RestoreBody();
        body.SetColor(ColorWheel.neutral);

        InitializeStatsOnSpawn();

        // Snap to spawn position
        transform.position = spawnPosition;
    }