示例#1
0
    private void OnCollisionEnter(Collision c)
    {
        BlockController block = c.gameObject.GetComponent <BlockController>();

        if (block && transform.localScale.y - BiomeManager.BlockToWorldPos(CurrentBiomePos(), block.biomeCoords).y < Biome.BlockSize * .9)
        {
            // TODO check if the Player is inside the x and z boundaries of the BlockThePlayerWalksOn.
            BlockThePlayerWalksOn = block;
        }
    }