示例#1
0
    public void RpcSetPlayerRot(bool temporary, float rot)
    {
        var rotationVector = transform.rotation.eulerAngles;

        rotationVector.z   = rot;
        transform.rotation = Quaternion.Euler(rotationVector);
        //So other players can walk over the Unconscious
        playerSprites.AdjustSpriteOrders(-30);
        if (temporary)
        {
            //TODO Coroutine with timer to get back up again
        }
    }
示例#2
0
    public void RpcSetPlayerRot(bool temporary, float rot)
    {
        //		Debug.LogWarning("Setting TileType to none for player and adjusting sortlayers in RpcSetPlayerRot");
        SpriteRenderer[] spriteRends = GetComponentsInChildren <SpriteRenderer>();
        foreach (SpriteRenderer sR in spriteRends)
        {
            sR.sortingLayerName = "Blood";
        }
        gameObject.GetComponent <RegisterTile>().UpdateTileType(TileType.None);
        var rotationVector = transform.rotation.eulerAngles;

        rotationVector.z   = rot;
        transform.rotation = Quaternion.Euler(rotationVector);
        //So other players can walk over the Unconscious
        playerSprites.AdjustSpriteOrders(-30);
        if (temporary)
        {
            //TODO Coroutine with timer to get back up again
        }
    }