diff --git a/WikiJam/Level/Fortaleza.tscn b/WikiJam/Level/Fortaleza.tscn index 57344c8..cb993d3 100644 --- a/WikiJam/Level/Fortaleza.tscn +++ b/WikiJam/Level/Fortaleza.tscn @@ -7,7 +7,7 @@ [ext_resource path="res://Enemies/Dino.tscn" type="PackedScene" id=5] [ext_resource path="res://Player/Player.tscn" type="PackedScene" id=6] -[sub_resource type="NavigationMesh" id=6] +[sub_resource type="NavigationMesh" id=1] vertices = PoolVector3Array( -68, 0.193805, -26, -68, 0.193805, -14, -65, 0.193805, -20, -62, 0.193805, -27, -60, 0.193805, -62, -68, 0.193805, -62, -68, 0.193805, -50, -68, 0.193805, -38, -68, 0.193805, -26, -62, 0.193805, -27, -59, 0.193805, -33, -56, 0.193805, -40, -68, 0.193805, -50, -68, 0.193805, -38, -56, 0.193805, -40, -51, 0.193805, -42, -51, 0.193805, -62, -60, 0.193805, -62, -3, 0.193805, -21, 0, 0.193805, -17, 4, 0.193805, -21, 20, 0.193805, -19, 21, 0.193805, -15, 28, 0.193805, -16, 20, 0.193805, -19, 28, 0.193805, -16, 28, 0.193805, -24, 17, 0.193805, -21, 38, 0.193805, -50, 40, 0.193805, -48, 48, 0.193805, -50, 48, 0.193805, -62, 41, 0.193805, -62, -39, 0.193805, -62, -51, 0.193805, -42, -42, 0.193805, -37, -27, 0.193805, -62, -32, 0.193805, -21, -29, 0.193805, -15, -21, 0.193805, -15, -39, 0.193805, -32, -36, 0.193805, -26, -32, 0.193805, -21, 10, 0.193805, -21, 28, 0.193805, -32, 28, 0.193805, -40, 4, 0.193805, -21, -15, 0.193805, -62, -27, 0.193805, -62, -42, 0.193805, -37, 38, 0.193805, -50, 41, 0.193805, -62, 35, 0.193805, -62, 32, 0.193805, -50, 28, 0.193805, -40, 29, 0.193805, -48, 10, 0.193805, -62, -2, 0.193805, -62, 32, 0.193805, -50, 35, 0.193805, -62, 23, 0.193805, -62, 29, 0.193805, -48, 32, 0.193805, -50, 23, 0.193805, -62, 16, 0.193805, -62, 17, 0.193805, -21, 28, 0.193805, -24, 28, 0.193805, -32, 10, 0.193805, -21, -32, 0.193805, -21, -21, 0.193805, -15, -16, 0.193805, -21, -42, 0.193805, -37, -39, 0.193805, -32, -42, 0.193805, -37, -16, 0.193805, -21, -10, 0.193805, -21, -9, 0.193805, -62, -15, 0.193805, -62, -3, 0.193805, -21, 4, 0.193805, -21, 28, 0.193805, -40, -3, 0.193805, -21, 28, 0.193805, -40, -2, 0.193805, -62, -9, 0.193805, -62, -10, 0.193805, -21, -39, 0.193805, -62, -51, 0.193805, -62, -51, 0.193805, -42, 29, 0.193805, -48, 16, 0.193805, -62, 10, 0.193805, -62, 58, 0.193805, 53, 61, 0.193805, 56, 65, 0.193805, 53, 47, 0.193805, 46, 45, 0.193805, 53, 51, 0.193805, 53, 152, 0.193805, -55, 152, 0.193805, -62, 145, 0.193805, -62, 42, 0.193805, 35, 42, 0.193805, 42, 47, 0.193805, 46, 47, 0.193805, 23, 42, 0.193805, 28, 42, 0.193805, 35, 47, 0.193805, 46, 47, 0.193805, 46, 51, 0.193805, 53, 58, 0.193805, 53, 54, 0.193805, -62, 48, 0.193805, -62, 48, 0.193805, -50, 45, 0.193805, -2, 41, 0.193805, -1, 41, 0.193805, 12, 45, 0.193805, 13, 152, 0.193805, -55, 145, 0.193805, -62, 139, 0.193805, -62, 53, 0.193805, -13, 48, 0.193805, 17, 88, 0.193805, 53, 152, 0.193805, 9, 152, 0.193805, 1, 100, 0.193805, -62, 54, 0.193805, -62, 48, 0.193805, -50, 53, 0.193805, -46, 61, 0.193805, -62, 92, 0.193805, 57, 152, 0.193805, 57, 152, 0.193805, 49, 45, 0.193805, -2, 45, 0.193805, 13, 48, 0.193805, 17, 49, 0.193805, -7, 47, 0.193805, 46, 58, 0.193805, 53, 65, 0.193805, 53, 152, 0.193805, -47, 152, 0.193805, -55, 139, 0.193805, -62, 132, 0.193805, -62, 67, 0.193805, -62, 61, 0.193805, -62, 53, 0.193805, -46, 92, 0.193805, 57, 92, 0.193805, 65, 152, 0.193805, 65, 152, 0.193805, 57, 100, 0.193805, -62, 93, 0.193805, -62, 53, 0.193805, -22, 53, 0.193805, -13, 92, 0.193805, 57, 152, 0.193805, 49, 152, 0.193805, 41, 74, 0.193805, -62, 67, 0.193805, -62, 53, 0.193805, -46, 48, 0.193805, 17, 47, 0.193805, 23, 47, 0.193805, 46, 76, 0.193805, 53, 88, 0.193805, 53, 47, 0.193805, 46, 65, 0.193805, 53, 76, 0.193805, 53, 152, 0.193805, -47, 132, 0.193805, -62, 126, 0.193805, -62, 53, 0.193805, -13, 49, 0.193805, -7, 48, 0.193805, 17, 80, 0.193805, -62, 74, 0.193805, -62, 53, 0.193805, -46, 152, 0.193805, -39, 152, 0.193805, -47, 126, 0.193805, -62, 119, 0.193805, -62, 80, 0.193805, -62, 53, 0.193805, -46, 53, 0.193805, -38, 87, 0.193805, -62, 152, 0.193805, -23, 106, 0.193805, -62, 100, 0.193805, -62, 152, 0.193805, -15, 92, 0.193805, 57, 152, 0.193805, 41, 152, 0.193805, 33, 88, 0.193805, 53, 92, 0.193805, 57, 152, 0.193805, 33, 152, 0.193805, 25, 152, 0.193805, -31, 152, 0.193805, -39, 119, 0.193805, -62, 113, 0.193805, -62, 93, 0.193805, -62, 87, 0.193805, -62, 53, 0.193805, -38, 53, 0.193805, -30, 152, 0.193805, 1, 152, 0.193805, -7, 100, 0.193805, -62, 88, 0.193805, 53, 152, 0.193805, 17, 152, 0.193805, 9, 152, 0.193805, -7, 152, 0.193805, -15, 100, 0.193805, -62, 152, 0.193805, -23, 152, 0.193805, -31, 113, 0.193805, -62, 106, 0.193805, -62, 93, 0.193805, -62, 53, 0.193805, -30, 53, 0.193805, -22, 88, 0.193805, 53, 152, 0.193805, 25, 152, 0.193805, 17, 23, 0.193805, 37, 28, 0.193805, 37, 28, 0.193805, 29, 30, 0.193805, -10, 28, 0.193805, -16, 21, 0.193805, -15, 21, 0.193805, -7, 36, 0.193805, -2, 33, 0.193805, -5, 21, 0.193805, 1, 21, 0.193805, 9, 29, 0.193805, 21, 36, 0.193805, 13, 12, 0.193805, 42, 16, 0.193805, 42, 23, 0.193805, 37, 17, 0.193805, 21, 11, 0.193805, 21, 33, 0.193805, -5, 30, 0.193805, -10, 21, 0.193805, -7, 21, 0.193805, 1, 29, 0.193805, 21, 21, 0.193805, 9, 21, 0.193805, 17, 36, 0.193805, 13, 41, 0.193805, 12, 41, 0.193805, -1, 36, 0.193805, -2, 29, 0.193805, 21, 21, 0.193805, 17, 17, 0.193805, 21, 23, 0.193805, 37, 28, 0.193805, 29, -28, 0.193805, -9, -32, 0.193805, -6, -30, 0.193805, -2, -21, 0.193805, -15, -29, 0.193805, -15, -28, 0.193805, -9, -21, 0.193805, -7, -21, 0.193805, 17, -21, 0.193805, 9, -30, 0.193805, 11, -36, 0.193805, 19, -21, 0.193805, 1, -21, 0.193805, -7, -28, 0.193805, -9, -30, 0.193805, -2, -30, 0.193805, 4, -24, 0.193805, 37, -17, 0.193805, 37, -16, 0.193805, 21, -36, 0.193805, 19, -42, 0.193805, 26, -30, 0.193805, 37, -24, 0.193805, 37, -16, 0.193805, 21, -21, 0.193805, 17, -21, 0.193805, 9, -21, 0.193805, 1, -30, 0.193805, 4, -30, 0.193805, 11, -42, 0.193805, 26, -42, 0.193805, 37, -30, 0.193805, 37, -1, 0.193805, 8, 0, 0.193805, 11, 2, 0.193805, 8, 2, 0.193805, -8, 0, 0.193805, -11, -1, 0.193805, -8, -1, 0.193805, 8, 2, 0.193805, 8, 7, 0.193805, 7, 7, 0.193805, -7, 2, 0.193805, -8, -1, 0.193805, -8, 7, 0.193805, 0, -7, 0.193805, 0, -7, 0.193805, 7, -1, 0.193805, 8, 7, 0.193805, 7, 7, 0.193805, 0, -1, 0.193805, -8, -1, 0.193805, -8, -7, 0.193805, -7, -7, 0.193805, 0, -52, 0.193805, 8, -51, 0.193805, 12, -46, 0.193805, 9, -44, 0.193805, 6, -44, 0.193805, -2, -48, 0.193805, -1, -40, 0.193805, -5, -41, 0.193805, -9, -44, 0.193805, -10, -48, 0.193805, -1, -44, 0.193805, -2, -62, 0.193805, 20, -68, 0.193805, 13, -68, 0.193805, 20, -62, 0.193805, 20, -68, 0.193805, 20, -68, 0.193805, 28, -56, 0.193805, 27, -62, 0.193805, 20, -68, 0.193805, 28, -68, 0.193805, 36, -56, 0.193805, 38, -41, 0.193805, 63, -41, 0.193805, 51, -52, 0.193805, 51, -52, 0.193805, 51, -68, 0.193805, 60, -68, 0.193805, 68, -56, 0.193805, 38, -68, 0.193805, 36, -68, 0.193805, 44, -55, 0.193805, 49, -56, 0.193805, 38, -68, 0.193805, 44, -68, 0.193805, 52, -41, 0.193805, 75, -41, 0.193805, 63, -52, 0.193805, 51, -68, 0.193805, 68, -68, 0.193805, 76, -52, 0.193805, 51, -55, 0.193805, 49, -68, 0.193805, 52, -68, 0.193805, 60, -1, 0.193805, 43, 0, 0.193805, 46, 5, 0.193805, 42, 4, 0.193805, 21, 0, 0.193805, 17, -3, 0.193805, 21, -10, 0.193805, 42, -1, 0.193805, 43, 5, 0.193805, 42, 5, 0.193805, 42, 12, 0.193805, 42, 11, 0.193805, 21, 4, 0.193805, 21, -10, 0.193805, 21, -16, 0.193805, 21, -17, 0.193805, 37, -10, 0.193805, 21, -17, 0.193805, 37, -10, 0.193805, 42, -3, 0.193805, 21, -27, 0.193805, 66, -27, 0.193805, 71, -25, 0.193805, 71, -19, 0.193805, 70, -19, 0.193805, 65, -25, 0.193805, 71, -24, 0.193805, 74, -19, 0.193805, 70, -3, 0.193805, 56, -7, 0.193805, 56, -7, 0.193805, 62, 5, 0.193805, 56, 2, 0.193805, 52, -3, 0.193805, 56, 14, 0.193805, 63, 14, 0.193805, 56, 5, 0.193805, 56, 5, 0.193805, 70, 14, 0.193805, 70, 14, 0.193805, 63, -11, 0.193805, 66, -19, 0.193805, 65, -19, 0.193805, 70, -11, 0.193805, 70, 5, 0.193805, 56, -3, 0.193805, 56, -7, 0.193805, 62, -3, 0.193805, 70, 5, 0.193805, 70, 14, 0.193805, 63, -7, 0.193805, 62, -11, 0.193805, 66, -11, 0.193805, 70, -3, 0.193805, 70, 92, 0.193805, 83, 152, 0.193805, 83, 152, 0.193805, 74, 92, 0.193805, 74, 92, 0.193805, 65, 92, 0.193805, 74, 152, 0.193805, 74, 152, 0.193805, 65, -19, 0.193805, 84, -22, 0.193805, 80, -25, 0.193805, 82, -22, 0.193805, 90, -17, 0.193805, 107, -1, 0.193805, 116, 5, 0.193805, 116, 12, 0.193805, 116, 15, 0.193805, 120, 20, 0.193805, 116, 16, 0.193805, 84, 9, 0.193805, 84, 51, 0.193805, 67, 42, 0.193805, 67, 42, 0.193805, 73, -12, 0.193805, 84, -19, 0.193805, 84, -22, 0.193805, 90, 54, 0.193805, 109, 61, 0.193805, 103, 54, 0.193805, 97, -17, 0.193805, 107, -14, 0.193805, 116, -8, 0.193805, 116, 60, 0.193805, 76, 60, 0.193805, 66, 51, 0.193805, 67, 41, 0.193805, 116, 48, 0.193805, 116, 54, 0.193805, 109, 55, 0.193805, 90, 60, 0.193805, 86, 60, 0.193805, 76, 51, 0.193805, 67, 42, 0.193805, 73, 42, 0.193805, 80, -12, 0.193805, 84, -22, 0.193805, 90, -19, 0.193805, 98, -5, 0.193805, 84, 54, 0.193805, 97, 38, 0.193805, 84, 30, 0.193805, 84, 27, 0.193805, 116, 34, 0.193805, 116, 54, 0.193805, 109, -17, 0.193805, 107, -8, 0.193805, 116, -1, 0.193805, 116, 2, 0.193805, 84, -19, 0.193805, 98, -17, 0.193805, 107, 5, 0.193805, 116, 12, 0.193805, 116, 9, 0.193805, 84, 27, 0.193805, 116, 30, 0.193805, 84, 23, 0.193805, 84, 20, 0.193805, 116, 55, 0.193805, 90, 42, 0.193805, 80, 38, 0.193805, 84, 54, 0.193805, 97, 20, 0.193805, 116, 23, 0.193805, 84, 16, 0.193805, 84, 2, 0.193805, 84, -5, 0.193805, 84, -19, 0.193805, 98, 34, 0.193805, 116, 41, 0.193805, 116, 54, 0.193805, 109, 74, 0.193805, 78, 74, 0.193805, 89, 78, 0.193805, 86, 78, 0.193805, 76, 74, 0.193805, 67, 74, 0.193805, 78, 78, 0.193805, 76, 78, 0.193805, 67, -36, 0.193805, 158, -25, 0.193805, 158, -26, 0.193805, 149, -68, 0.193805, 147, -68, 0.193805, 158, -58, 0.193805, 158, -26, 0.193805, 131, -26, 0.193805, 122, -30, 0.193805, 112, -36, 0.193805, 158, -26, 0.193805, 149, -26, 0.193805, 140, -47, 0.193805, 158, -34, 0.193805, 102, -37, 0.193805, 91, -41, 0.193805, 81, -68, 0.193805, 96, -68, 0.193805, 106, -68, 0.193805, 137, -68, 0.193805, 147, -58, 0.193805, 158, -41, 0.193805, 81, -41, 0.193805, 75, -68, 0.193805, 76, -68, 0.193805, 86, -34, 0.193805, 102, -68, 0.193805, 106, -68, 0.193805, 117, -30, 0.193805, 112, -34, 0.193805, 102, -68, 0.193805, 117, -68, 0.193805, 127, -47, 0.193805, 158, -26, 0.193805, 140, -26, 0.193805, 140, -26, 0.193805, 131, -30, 0.193805, 112, -68, 0.193805, 137, -58, 0.193805, 158, -47, 0.193805, 158, -68, 0.193805, 127, -41, 0.193805, 81, -68, 0.193805, 86, -68, 0.193805, 96, 57, 0.193805, 147, 57, 0.193805, 154, 66, 0.193805, 154, 91, 0.193805, 93, 86, 0.193805, 97, 82, 0.193805, 101, 78, 0.193805, 106, 74, 0.193805, 110, 69, 0.193805, 114, 65, 0.193805, 118, 66, 0.193805, 154, 69, 0.193805, 158, 79, 0.193805, 158, 141, 0.193805, 158, 152, 0.193805, 158, 152, 0.193805, 148, 57, 0.193805, 140, 57, 0.193805, 147, 66, 0.193805, 154, 65, 0.193805, 118, 57, 0.193805, 126, 57, 0.193805, 133, 74, 0.193805, 110, 152, 0.193805, 110, 152, 0.193805, 101, 91, 0.193805, 93, 78, 0.193805, 106, 66, 0.193805, 154, 120, 0.193805, 158, 141, 0.193805, 158, 152, 0.193805, 148, 152, 0.193805, 139, 57, 0.193805, 133, 57, 0.193805, 140, 66, 0.193805, 154, 78, 0.193805, 106, 74, 0.193805, 110, 66, 0.193805, 154, 79, 0.193805, 158, 89, 0.193805, 158, 131, 0.193805, 158, 141, 0.193805, 158, 152, 0.193805, 139, 152, 0.193805, 129, 66, 0.193805, 154, 110, 0.193805, 158, 120, 0.193805, 158, 66, 0.193805, 154, 89, 0.193805, 158, 99, 0.193805, 158, 120, 0.193805, 158, 152, 0.193805, 120, 152, 0.193805, 110, 152, 0.193805, 92, 152, 0.193805, 83, 92, 0.193805, 83, 120, 0.193805, 158, 131, 0.193805, 158, 152, 0.193805, 129, 152, 0.193805, 120, 66, 0.193805, 154, 99, 0.193805, 158, 110, 0.193805, 158, 152, 0.193805, 92, 92, 0.193805, 83, 91, 0.193805, 93, 152, 0.193805, 101, -12, 0.193805, 140, -12, 0.193805, 145, -10, 0.193805, 145, -4, 0.193805, 144, -4, 0.193805, 139, -10, 0.193805, 145, -9, 0.193805, 148, -4, 0.193805, 144, 12, 0.193805, 130, 8, 0.193805, 130, 8, 0.193805, 136, 20, 0.193805, 130, 17, 0.193805, 126, 12, 0.193805, 130, 29, 0.193805, 137, 29, 0.193805, 130, 20, 0.193805, 130, 20, 0.193805, 144, 29, 0.193805, 144, 29, 0.193805, 137, 4, 0.193805, 140, -4, 0.193805, 139, -4, 0.193805, 144, 4, 0.193805, 144, 20, 0.193805, 130, 12, 0.193805, 130, 8, 0.193805, 136, 12, 0.193805, 144, 20, 0.193805, 144, 29, 0.193805, 137, 8, 0.193805, 136, 4, 0.193805, 140, 4, 0.193805, 144, 12, 0.193805, 144 ) polygons = [ PoolIntArray( 3, 0, 2 ), PoolIntArray( 0, 1, 2 ), PoolIntArray( 6, 4, 5 ), PoolIntArray( 11, 7, 10 ), PoolIntArray( 7, 9, 10 ), PoolIntArray( 7, 8, 9 ), PoolIntArray( 17, 12, 16 ), PoolIntArray( 12, 15, 16 ), PoolIntArray( 12, 14, 15 ), PoolIntArray( 12, 13, 14 ), PoolIntArray( 20, 18, 19 ), PoolIntArray( 23, 21, 22 ), PoolIntArray( 27, 24, 26 ), PoolIntArray( 24, 25, 26 ), PoolIntArray( 32, 28, 31 ), PoolIntArray( 28, 29, 31 ), PoolIntArray( 29, 30, 31 ), PoolIntArray( 36, 33, 35 ), PoolIntArray( 33, 34, 35 ), PoolIntArray( 39, 37, 38 ), PoolIntArray( 42, 40, 41 ), PoolIntArray( 46, 43, 45 ), PoolIntArray( 43, 44, 45 ), PoolIntArray( 49, 47, 48 ), PoolIntArray( 53, 50, 52 ), PoolIntArray( 50, 51, 52 ), PoolIntArray( 57, 54, 56 ), PoolIntArray( 54, 55, 56 ), PoolIntArray( 60, 58, 59 ), PoolIntArray( 64, 61, 63 ), PoolIntArray( 61, 62, 63 ), PoolIntArray( 68, 65, 67 ), PoolIntArray( 65, 66, 67 ), PoolIntArray( 73, 69, 72 ), PoolIntArray( 69, 70, 72 ), PoolIntArray( 70, 71, 72 ), PoolIntArray( 78, 74, 77 ), PoolIntArray( 74, 75, 77 ), PoolIntArray( 75, 76, 77 ), PoolIntArray( 81, 79, 80 ), PoolIntArray( 86, 82, 85 ), PoolIntArray( 82, 84, 85 ), PoolIntArray( 82, 83, 84 ), PoolIntArray( 89, 87, 88 ), PoolIntArray( 92, 90, 91 ), PoolIntArray( 95, 93, 94 ), PoolIntArray( 98, 96, 97 ), PoolIntArray( 101, 99, 100 ), PoolIntArray( 104, 102, 103 ), PoolIntArray( 108, 105, 107 ), PoolIntArray( 105, 106, 107 ), PoolIntArray( 111, 109, 110 ), PoolIntArray( 114, 112, 113 ), PoolIntArray( 118, 115, 117 ), PoolIntArray( 115, 116, 117 ), PoolIntArray( 121, 119, 120 ), PoolIntArray( 127, 122, 126 ), PoolIntArray( 122, 125, 126 ), PoolIntArray( 122, 123, 125 ), PoolIntArray( 123, 124, 125 ), PoolIntArray( 131, 128, 130 ), PoolIntArray( 128, 129, 130 ), PoolIntArray( 134, 132, 133 ), PoolIntArray( 138, 135, 137 ), PoolIntArray( 135, 136, 137 ), PoolIntArray( 141, 139, 140 ), PoolIntArray( 145, 142, 144 ), PoolIntArray( 142, 143, 144 ), PoolIntArray( 148, 146, 147 ), PoolIntArray( 152, 149, 151 ), PoolIntArray( 149, 150, 151 ), PoolIntArray( 156, 153, 155 ), PoolIntArray( 153, 154, 155 ), PoolIntArray( 159, 157, 158 ), PoolIntArray( 162, 160, 161 ), PoolIntArray( 167, 163, 166 ), PoolIntArray( 163, 164, 166 ), PoolIntArray( 164, 165, 166 ), PoolIntArray( 170, 168, 169 ), PoolIntArray( 173, 171, 172 ), PoolIntArray( 176, 174, 175 ), PoolIntArray( 179, 177, 178 ), PoolIntArray( 183, 180, 182 ), PoolIntArray( 180, 181, 182 ), PoolIntArray( 187, 184, 186 ), PoolIntArray( 184, 185, 186 ), PoolIntArray( 191, 188, 190 ), PoolIntArray( 188, 189, 190 ), PoolIntArray( 194, 192, 193 ), PoolIntArray( 198, 195, 197 ), PoolIntArray( 195, 196, 197 ), PoolIntArray( 202, 199, 201 ), PoolIntArray( 199, 200, 201 ), PoolIntArray( 206, 203, 205 ), PoolIntArray( 203, 204, 205 ), PoolIntArray( 209, 207, 208 ), PoolIntArray( 212, 210, 211 ), PoolIntArray( 215, 213, 214 ), PoolIntArray( 219, 216, 218 ), PoolIntArray( 216, 217, 218 ), PoolIntArray( 222, 220, 221 ), PoolIntArray( 225, 223, 224 ), PoolIntArray( 228, 226, 227 ), PoolIntArray( 232, 229, 231 ), PoolIntArray( 229, 230, 231 ), PoolIntArray( 238, 233, 237 ), PoolIntArray( 233, 234, 237 ), PoolIntArray( 234, 236, 237 ), PoolIntArray( 234, 235, 236 ), PoolIntArray( 243, 239, 242 ), PoolIntArray( 239, 240, 242 ), PoolIntArray( 240, 241, 242 ), PoolIntArray( 247, 244, 246 ), PoolIntArray( 244, 245, 246 ), PoolIntArray( 250, 248, 249 ), PoolIntArray( 254, 251, 253 ), PoolIntArray( 251, 252, 253 ), PoolIntArray( 259, 255, 258 ), PoolIntArray( 255, 256, 258 ), PoolIntArray( 256, 257, 258 ), PoolIntArray( 262, 260, 261 ), PoolIntArray( 266, 263, 265 ), PoolIntArray( 263, 264, 265 ), PoolIntArray( 270, 267, 269 ), PoolIntArray( 267, 268, 269 ), PoolIntArray( 275, 271, 274 ), PoolIntArray( 271, 272, 274 ), PoolIntArray( 272, 273, 274 ), PoolIntArray( 278, 276, 277 ), PoolIntArray( 284, 279, 283 ), PoolIntArray( 279, 280, 283 ), PoolIntArray( 280, 281, 283 ), PoolIntArray( 281, 282, 283 ), PoolIntArray( 288, 285, 287 ), PoolIntArray( 285, 286, 287 ), PoolIntArray( 291, 289, 290 ), PoolIntArray( 294, 292, 293 ), PoolIntArray( 297, 295, 296 ), PoolIntArray( 300, 298, 299 ), PoolIntArray( 304, 301, 303 ), PoolIntArray( 301, 302, 303 ), PoolIntArray( 310, 305, 309 ), PoolIntArray( 305, 308, 309 ), PoolIntArray( 305, 307, 308 ), PoolIntArray( 305, 306, 307 ), PoolIntArray( 313, 311, 312 ), PoolIntArray( 319, 314, 318 ), PoolIntArray( 314, 317, 318 ), PoolIntArray( 314, 316, 317 ), PoolIntArray( 314, 315, 316 ), PoolIntArray( 324, 320, 323 ), PoolIntArray( 320, 321, 323 ), PoolIntArray( 321, 322, 323 ), PoolIntArray( 327, 325, 326 ), PoolIntArray( 330, 328, 329 ), PoolIntArray( 335, 331, 334 ), PoolIntArray( 331, 333, 334 ), PoolIntArray( 331, 332, 333 ), PoolIntArray( 338, 336, 337 ), PoolIntArray( 341, 339, 340 ), PoolIntArray( 344, 342, 343 ), PoolIntArray( 348, 345, 347 ), PoolIntArray( 345, 346, 347 ), PoolIntArray( 353, 349, 352 ), PoolIntArray( 349, 350, 352 ), PoolIntArray( 350, 351, 352 ), PoolIntArray( 357, 354, 356 ), PoolIntArray( 354, 355, 356 ), PoolIntArray( 360, 358, 359 ), PoolIntArray( 366, 361, 365 ), PoolIntArray( 361, 362, 365 ), PoolIntArray( 362, 363, 365 ), PoolIntArray( 363, 364, 365 ), PoolIntArray( 370, 367, 369 ), PoolIntArray( 367, 368, 369 ), PoolIntArray( 373, 371, 372 ), PoolIntArray( 377, 374, 376 ), PoolIntArray( 374, 375, 376 ), PoolIntArray( 382, 378, 381 ), PoolIntArray( 378, 380, 381 ), PoolIntArray( 378, 379, 380 ), PoolIntArray( 385, 383, 384 ), PoolIntArray( 388, 386, 387 ), PoolIntArray( 391, 389, 390 ), PoolIntArray( 394, 392, 393 ), PoolIntArray( 397, 395, 396 ), PoolIntArray( 401, 398, 400 ), PoolIntArray( 398, 399, 400 ), PoolIntArray( 407, 402, 406 ), PoolIntArray( 402, 405, 406 ), PoolIntArray( 402, 403, 405 ), PoolIntArray( 403, 404, 405 ), PoolIntArray( 411, 408, 410 ), PoolIntArray( 408, 409, 410 ), PoolIntArray( 415, 412, 414 ), PoolIntArray( 412, 413, 414 ), PoolIntArray( 419, 416, 418 ), PoolIntArray( 416, 417, 418 ), PoolIntArray( 423, 420, 422 ), PoolIntArray( 420, 421, 422 ), PoolIntArray( 426, 424, 425 ), PoolIntArray( 431, 427, 430 ), PoolIntArray( 427, 429, 430 ), PoolIntArray( 427, 428, 429 ), PoolIntArray( 434, 432, 433 ), PoolIntArray( 437, 435, 436 ), PoolIntArray( 440, 438, 439 ), PoolIntArray( 443, 441, 442 ), PoolIntArray( 446, 444, 445 ), PoolIntArray( 449, 447, 448 ), PoolIntArray( 455, 450, 454 ), PoolIntArray( 450, 451, 454 ), PoolIntArray( 451, 452, 454 ), PoolIntArray( 452, 453, 454 ), PoolIntArray( 459, 456, 458 ), PoolIntArray( 456, 457, 458 ), PoolIntArray( 465, 460, 464 ), PoolIntArray( 460, 463, 464 ), PoolIntArray( 460, 461, 463 ), PoolIntArray( 461, 462, 463 ), PoolIntArray( 468, 466, 467 ), PoolIntArray( 474, 469, 473 ), PoolIntArray( 469, 472, 473 ), PoolIntArray( 469, 471, 472 ), PoolIntArray( 469, 470, 471 ), PoolIntArray( 478, 475, 477 ), PoolIntArray( 475, 476, 477 ), PoolIntArray( 482, 479, 481 ), PoolIntArray( 479, 480, 481 ), PoolIntArray( 485, 483, 484 ), PoolIntArray( 488, 486, 487 ), PoolIntArray( 491, 489, 490 ), PoolIntArray( 495, 492, 494 ), PoolIntArray( 492, 493, 494 ), PoolIntArray( 499, 496, 498 ), PoolIntArray( 496, 497, 498 ), PoolIntArray( 502, 500, 501 ), PoolIntArray( 505, 503, 504 ), PoolIntArray( 508, 506, 507 ), PoolIntArray( 512, 509, 511 ), PoolIntArray( 509, 510, 511 ), PoolIntArray( 517, 513, 516 ), PoolIntArray( 513, 514, 516 ), PoolIntArray( 514, 515, 516 ), PoolIntArray( 520, 518, 519 ), PoolIntArray( 524, 521, 523 ), PoolIntArray( 521, 522, 523 ), PoolIntArray( 527, 525, 526 ), PoolIntArray( 533, 528, 532 ), PoolIntArray( 528, 529, 532 ), PoolIntArray( 529, 531, 532 ), PoolIntArray( 529, 530, 531 ), PoolIntArray( 536, 534, 535 ), PoolIntArray( 540, 537, 539 ), PoolIntArray( 537, 538, 539 ), PoolIntArray( 543, 541, 542 ), PoolIntArray( 546, 544, 545 ), PoolIntArray( 550, 547, 549 ), PoolIntArray( 547, 548, 549 ), PoolIntArray( 553, 551, 552 ), PoolIntArray( 556, 554, 555 ), PoolIntArray( 559, 557, 558 ), PoolIntArray( 562, 560, 561 ), PoolIntArray( 566, 563, 565 ), PoolIntArray( 563, 564, 565 ), PoolIntArray( 572, 567, 571 ), PoolIntArray( 567, 568, 571 ), PoolIntArray( 568, 570, 571 ), PoolIntArray( 568, 569, 570 ), PoolIntArray( 575, 573, 574 ), PoolIntArray( 580, 576, 579 ), PoolIntArray( 576, 577, 579 ), PoolIntArray( 577, 578, 579 ), PoolIntArray( 583, 581, 582 ), PoolIntArray( 587, 584, 586 ), PoolIntArray( 584, 585, 586 ), PoolIntArray( 590, 588, 589 ), PoolIntArray( 593, 591, 592 ), PoolIntArray( 596, 594, 595 ), PoolIntArray( 599, 597, 598 ), PoolIntArray( 603, 600, 602 ), PoolIntArray( 600, 601, 602 ), PoolIntArray( 606, 604, 605 ), PoolIntArray( 610, 607, 609 ), PoolIntArray( 607, 608, 609 ), PoolIntArray( 615, 611, 614 ), PoolIntArray( 611, 613, 614 ), PoolIntArray( 611, 612, 613 ), PoolIntArray( 618, 616, 617 ), PoolIntArray( 621, 619, 620 ), PoolIntArray( 624, 622, 623 ), PoolIntArray( 627, 625, 626 ), PoolIntArray( 630, 628, 629 ), PoolIntArray( 634, 631, 633 ), PoolIntArray( 631, 632, 633 ), PoolIntArray( 640, 635, 639 ), PoolIntArray( 635, 638, 639 ), PoolIntArray( 635, 636, 638 ), PoolIntArray( 636, 637, 638 ), PoolIntArray( 644, 641, 643 ), PoolIntArray( 641, 642, 643 ) ] cell/size = 1.0 @@ -15,20 +15,20 @@ cell/height = 0.1 agent/height = 5.0 agent/radius = 5.0 -[sub_resource type="ProceduralSky" id=4] +[sub_resource type="ProceduralSky" id=2] sun_latitude = 56.18 sun_longitude = 148.23 -[sub_resource type="Environment" id=5] +[sub_resource type="Environment" id=3] background_mode = 2 -background_sky = SubResource( 4 ) +background_sky = SubResource( 2 ) [node name="Fortaleza" type="Spatial"] [node name="Navigation" type="Navigation" parent="."] [node name="NavigationMeshInstance" type="NavigationMeshInstance" parent="Navigation"] -navmesh = SubResource( 6 ) +navmesh = SubResource( 1 ) [node name="Ground" parent="Navigation/NavigationMeshInstance" instance=ExtResource( 1 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 42, 0, 48 ) @@ -249,14 +249,14 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 15, 0, 74 ) [node name="Dino" parent="Navigation" instance=ExtResource( 5 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, -41 ) -player_path = NodePath("../../Spatial") +player_path = NodePath("../../Player") [node name="WorldEnvironment" type="WorldEnvironment" parent="."] -environment = SubResource( 5 ) +environment = SubResource( 3 ) [node name="DirectionalLight" type="DirectionalLight" parent="WorldEnvironment"] transform = Transform( 0.970593, 0.0833647, 0.225829, -0.239289, 0.43643, 0.867335, -0.0262536, -0.895868, 0.443544, 0, 46, 0 ) shadow_enabled = true -[node name="Spatial" parent="." instance=ExtResource( 6 )] +[node name="Player" parent="." instance=ExtResource( 6 )] transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 1, 0 ) diff --git a/WikiJam/Level/Level.tscn b/WikiJam/Level/Level.tscn index 7b64608..d11eacb 100644 --- a/WikiJam/Level/Level.tscn +++ b/WikiJam/Level/Level.tscn @@ -2,12 +2,12 @@ [ext_resource path="res://Player/Player.tscn" type="PackedScene" id=1] -[sub_resource type="NavigationMesh" id=1] +[sub_resource type="NavigationMesh" id=3] [sub_resource type="BoxShape" id=2] extents = Vector3( 10, 1, 10 ) -[sub_resource type="PlaneMesh" id=3] +[sub_resource type="PlaneMesh" id=4] size = Vector2( 20, 20 ) [node name="Level" type="Spatial"] @@ -18,7 +18,7 @@ size = Vector2( 20, 20 ) editor/display_folded = true [node name="NavigationMeshInstance" type="NavigationMeshInstance" parent="Navigation"] -navmesh = SubResource( 1 ) +navmesh = SubResource( 3 ) [node name="StaticBody" type="StaticBody" parent="Navigation/NavigationMeshInstance"] @@ -27,6 +27,6 @@ transform = Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, -1, 0 ) shape = SubResource( 2 ) [node name="MeshInstance" type="MeshInstance" parent="Navigation/NavigationMeshInstance"] -mesh = SubResource( 3 ) +mesh = SubResource( 4 ) skeleton = NodePath("") material/0 = null diff --git a/WikiJam/Level/Objects/Crystal.gd b/WikiJam/Level/Objects/Crystal.gd new file mode 100644 index 0000000..c7e40e3 --- /dev/null +++ b/WikiJam/Level/Objects/Crystal.gd @@ -0,0 +1,5 @@ +extends Spatial + + +func _ready(): + Collector.addCollectible(self) \ No newline at end of file diff --git a/WikiJam/Level/Objects/Crystal.tscn b/WikiJam/Level/Objects/Crystal.tscn new file mode 100644 index 0000000..3aefd1d --- /dev/null +++ b/WikiJam/Level/Objects/Crystal.tscn @@ -0,0 +1,20 @@ +[gd_scene load_steps=4 format=2] + +[ext_resource path="res://Level/Objects/Crystal.gd" type="Script" id=1] + +[sub_resource type="CapsuleShape" id=2] + +[sub_resource type="CapsuleMesh" id=1] + +[node name="Crystal" type="Spatial"] +transform = Transform( 1, 0, 0, 0, -4.37114e-008, -1, 0, 1, -4.37114e-008, 0, 2, 0 ) +script = ExtResource( 1 ) + +[node name="CrystalBody" type="StaticBody" parent="."] + +[node name="CollisionShape" type="CollisionShape" parent="CrystalBody"] +shape = SubResource( 2 ) + +[node name="MeshInstance" type="MeshInstance" parent="CrystalBody"] +mesh = SubResource( 1 ) +material/0 = null diff --git a/WikiJam/Player/Player.gd b/WikiJam/Player/Player.gd index 5bb24cb..c482360 100644 --- a/WikiJam/Player/Player.gd +++ b/WikiJam/Player/Player.gd @@ -2,10 +2,9 @@ extends KinematicBody # export variables export(NodePath) var body_nodepath -#export(NodePath) var lookingAt_nodepath +export(NodePath) var camera_nodepath export(NodePath) var animation_nodepath export(NodePath) var ui_nodepath -export(NodePath) var camera_nodepath # const const GRAVITY = -24.8 @@ -20,7 +19,6 @@ const INTERACT_DISTANCE = 4 # private members var _body: Spatial var _camera: Camera -#var _lookCast: RayCast var _animation: AnimationPlayer var _interface: Control var _dir = Vector3(); @@ -39,23 +37,24 @@ func _ready(): _animation = get_node(animation_nodepath) as AnimationPlayer assert(null != _animation) - # Setup mouse look - Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) - #_lookCast = get_node(lookingAt_nodepath) as RayCast - #_lookCast.cast_to = Vector3(0, 0, INTERACT_DISTANCE) - _interface = get_node(ui_nodepath) as Control assert(null != _interface) + + # Setup mouse look + Input.set_mouse_mode(Input.MOUSE_MODE_CAPTURED) func _physics_process(delta): - process_input() - process_movement(delta) + _process_input() + _process_movement(delta) + _process_collision() + func _process(_delta): - process_animations() + _process_animations() -func process_input(): + +func _process_input(): # Walking var input_movement_vector = Vector2() if Input.is_action_pressed("move_fwrd"): @@ -81,7 +80,7 @@ func process_input(): _is_sprinting = Input.is_action_pressed("move_sprint") -func process_movement(delta): +func _process_movement(delta): _vel.y += delta * GRAVITY # set movement speed @@ -94,10 +93,24 @@ func process_movement(delta): _vel = move_and_slide(_vel, Vector3(0, 1, 0), 0.05, 4, deg2rad(MAX_SLOPE_ANGLE)) -func process_animations(): +func _process_animations(): _animation.playback_speed = _vel.length() / MOVE_SPEED +func _process_collision(): + var collCount = get_slide_count() + if collCount > 0: + #Logger.debug("Collide count: ", collCount) + for i in collCount: + var collision = get_slide_collision(i) + #Logger.debug("Collided with: ", collision.collider.name) + #TODO: replace with groups + if collision.collider.name == "CrystalBody": + #Logger.debug("removing crystal...") + collision.collider.queue_free() + _interface.increaseScore() + + func _input(event): # capture mouse movement if event is InputEventMouseMotion: diff --git a/WikiJam/Player/Player.tscn b/WikiJam/Player/Player.tscn index 31d2bd8..efd8d30 100644 --- a/WikiJam/Player/Player.tscn +++ b/WikiJam/Player/Player.tscn @@ -42,12 +42,12 @@ tracks/1/keys = { } ] } -[node name="Spatial" type="KinematicBody"] +[node name="Player" type="KinematicBody"] script = ExtResource( 1 ) body_nodepath = NodePath("Body") +camera_nodepath = NodePath("Camera") animation_nodepath = NodePath("WalkAnimationPlayer") ui_nodepath = NodePath("HUD") -camera_nodepath = NodePath("Camera") [node name="Body" type="Spatial" parent="."] @@ -73,6 +73,7 @@ pitch_scale = 1.5 [node name="HUD" parent="." instance=ExtResource( 4 )] script = ExtResource( 5 ) +label_nodepath = NodePath("LabelScore") [node name="LabelScore" type="Label" parent="HUD"] margin_left = 15.0 diff --git a/WikiJam/Player/UI/HUD.gd b/WikiJam/Player/UI/HUD.gd index 68638f9..d68cafb 100644 --- a/WikiJam/Player/UI/HUD.gd +++ b/WikiJam/Player/UI/HUD.gd @@ -1,13 +1,21 @@ extends Control -# Declare member variables here. Examples: -# var a = 2 -# var b = "text" +export(NodePath) var label_nodepath + +const SCORE = 100 + +var _labelScore: Label +var _score: int = 0 + -# Called when the node enters the scene tree for the first time. func _ready(): - pass # Replace with function body. + _labelScore = get_node(label_nodepath) as Label + assert(null != _labelScore) -# Called every frame. 'delta' is the elapsed time since the previous frame. -#func _process(delta): -# pass + +func increaseScore(): + _score += SCORE + _labelScore.text = "Score: " + String(_score) + if (_score / SCORE == Collector.getCount()): + Logger.info("YOU WON!") + \ No newline at end of file diff --git a/WikiJam/Util/Collector.gd b/WikiJam/Util/Collector.gd new file mode 100644 index 0000000..c504a8e --- /dev/null +++ b/WikiJam/Util/Collector.gd @@ -0,0 +1,13 @@ +extends Node + +var _collectibles: Array + + +func addCollectible (coll): + Logger.info("appending new collectible: " + String(coll.get_instance_id())) + Logger.info("current collection count: " + String(Collector.getCount())) + _collectibles.append(coll) + + +func getCount (): + return _collectibles.size() \ No newline at end of file diff --git a/WikiJam/project.godot b/WikiJam/project.godot index b9dfac1..025125d 100644 --- a/WikiJam/project.godot +++ b/WikiJam/project.godot @@ -63,6 +63,7 @@ config/icon="res://icon.png" [autoload] Logger="*res://Util/gs_logger/logger.gd" +Collector="*res://Util/Collector.gd" [input]