Browse Source

隐藏座位上的加号

master
cristianoxin 5 months ago
parent
commit
e5da09fea4
  1. 39
      assets/10001/10001.scene
  2. 240
      assets/10001/prefab/TeenPattieGame.prefab
  3. 2
      assets/10001/src/game/logic/TeenPattiePlayerLogic.ts
  4. 80
      assets/10001/src/game/logic/TeenpattieFaPaiEffectLogic.ts

39
assets/10001/10001.scene

@ -21,11 +21,11 @@
"_active": true,
"_components": [],
"_prefab": {
"__id__": 28
"__id__": 30
},
"autoReleaseAssets": false,
"_globals": {
"__id__": 29
"__id__": 31
},
"_id": "d1909322-c6a3-4ec5-a6b8-ceddf19ccd9d"
},
@ -47,13 +47,13 @@
"_active": true,
"_components": [
{
"__id__": 25
"__id__": 27
},
{
"__id__": 26
"__id__": 28
},
{
"__id__": 27
"__id__": 29
}
],
"_prefab": null,
@ -231,6 +231,9 @@
},
{
"__id__": 23
},
{
"__id__": 25
}
],
"removedComponents": []
@ -417,6 +420,22 @@
"begpg28VxM64yJwl420kcb"
]
},
{
"__type__": "CCPropertyOverrideInfo",
"targetInfo": {
"__id__": 26
},
"propertyPath": [
"_active"
],
"value": false
},
{
"__type__": "cc.TargetInfo",
"localID": [
"65G/5mEvVHs4tnDdMIolV3"
]
},
{
"__type__": "cc.UITransform",
"_name": "",
@ -494,19 +513,19 @@
{
"__type__": "cc.SceneGlobals",
"ambient": {
"__id__": 30
"__id__": 32
},
"shadows": {
"__id__": 31
"__id__": 33
},
"_skybox": {
"__id__": 32
"__id__": 34
},
"fog": {
"__id__": 33
"__id__": 35
},
"octree": {
"__id__": 34
"__id__": 36
}
},
{

240
assets/10001/prefab/TeenPattieGame.prefab

@ -10260,7 +10260,7 @@
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@ -10588,8 +10588,8 @@
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": -0.8884370528827384,
"w": 0.4589984782818286
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
@ -10602,7 +10602,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": -125.355
"z": 0
},
"_id": ""
},
@ -10628,21 +10628,21 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -25.521,
"y": -7.002,
"x": 9.056782960820044,
"y": 24.86612409284163,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.289416066322667,
"w": 0.9572033956032091
"z": -0.6964828590086977,
"w": 0.7175734297666481
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"x": 0.4000000000000001,
"y": 0.4000000000000001,
"z": 1
},
"_layer": 33554432,
@ -10650,7 +10650,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 33.646
"z": -88.291
},
"_id": ""
},
@ -10757,21 +10757,21 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -0.818,
"y": -0.193,
"x": 0.3159207448311463,
"y": 0.7788241669242666,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.11146893220632548,
"w": 0.9937679191605964
"z": -0.8201518758737721,
"w": 0.5721458734455163
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"x": 0.4000000000000002,
"y": 0.4000000000000002,
"z": 1
},
"_layer": 33554432,
@ -10779,7 +10779,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 12.8
"z": -110.2
},
"_id": ""
},
@ -10886,21 +10886,21 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 25.634,
"y": -1.641,
"x": -16.17124901002984,
"y": -19.957092535126662,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": -0.07549213969850695,
"w": 0.9971463968965345
"z": -0.9326043834932188,
"w": 0.3609003517444021
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"x": 0.40000000000000013,
"y": 0.40000000000000013,
"z": 1
},
"_layer": 33554432,
@ -10908,7 +10908,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": -8.659
"z": -137.689
},
"_id": ""
},
@ -13133,7 +13133,7 @@
"__id__": 379
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 605
@ -16003,7 +16003,7 @@
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@ -16331,8 +16331,8 @@
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": -0.503019946630235,
"w": 0.8642748019537048
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
@ -16345,7 +16345,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": -60.4
"z": 0
},
"_id": ""
},
@ -16371,16 +16371,16 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -21.636,
"y": 0.473,
"x": -10.27565512376043,
"y": 19.046026797669242,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.14360489345601235,
"w": 0.9896351017296665
"z": -0.37369210520418616,
"w": 0.9275528073959258
},
"_lscale": {
"__type__": "cc.Vec3",
@ -16393,7 +16393,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 16.513
"z": -43.887
},
"_id": ""
},
@ -16500,16 +16500,16 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 4.233,
"y": 2.193,
"x": 3.9976583016559744,
"y": -2.597357523176356,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
"z": -0.5030199466302351,
"w": 0.8642748019537047
},
"_lscale": {
"__type__": "cc.Vec3",
@ -16522,7 +16522,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
"z": -60.400000000000006
},
"_id": ""
},
@ -16629,16 +16629,16 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 27.834,
"y": -7.585,
"x": 7.1532588742084044,
"y": -27.948070925889652,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": -0.17571896271037635,
"w": 0.9844403720611977
"z": -0.6470626151108932,
"w": 0.7624368643539293
},
"_lscale": {
"__type__": "cc.Vec3",
@ -16651,7 +16651,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": -20.241
"z": -80.64099999999998
},
"_id": ""
},
@ -18215,7 +18215,7 @@
"__id__": 613
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 839
@ -26302,7 +26302,7 @@
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@ -26630,8 +26630,8 @@
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.49485212854485844,
"w": 0.8689771981327374
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
@ -26644,13 +26644,13 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 59.32
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "card3",
"_name": "card1",
"_objFlags": 0,
"_parent": {
"__id__": 1226
@ -26670,16 +26670,16 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -25.818,
"y": -8.038,
"x": -6.260522491607389,
"y": -26.30559685945326,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.1663212987521127,
"w": 0.9860716128057893
"z": 0.6324890526740153,
"w": 0.7745692985443761
},
"_lscale": {
"__type__": "cc.Vec3",
@ -26692,7 +26692,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 19.148
"z": 78.46800000000005
},
"_id": ""
},
@ -26799,16 +26799,16 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -1.03,
"y": 1.442,
"x": -1.7657139073867256,
"y": -0.15006131167262993,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
"z": 0.4948521285448584,
"w": 0.8689771981327375
},
"_lscale": {
"__type__": "cc.Vec3",
@ -26821,7 +26821,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
"z": 59.32
},
"_id": ""
},
@ -26908,7 +26908,7 @@
},
{
"__type__": "cc.Node",
"_name": "card1",
"_name": "card3",
"_objFlags": 0,
"_parent": {
"__id__": 1226
@ -26928,16 +26928,16 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 24.554,
"y": -1.427,
"x": 13.755763707811411,
"y": 20.389070842362003,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": -0.18857269463657433,
"w": 0.9820592338741596
"z": 0.32210873041013016,
"w": 0.9467026807786983
},
"_lscale": {
"__type__": "cc.Vec3",
@ -26950,7 +26950,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": -21.739
"z": 37.580999999999996
},
"_id": ""
},
@ -28514,7 +28514,7 @@
"__id__": 1091
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 1317
@ -30723,7 +30723,7 @@
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@ -31051,8 +31051,8 @@
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.8413740349001515,
"w": 0.5404532666159385
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
@ -31065,13 +31065,13 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 114.571
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "card3",
"_name": "card1",
"_objFlags": 0,
"_parent": {
"__id__": 1430
@ -31091,21 +31091,21 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -24.198,
"y": -6.47,
"x": 15.94614535473761,
"y": -19.31643218416849,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.19072333151821552,
"w": 0.9816438309359423
"z": 0.9314183482400848,
"w": 0.36395035452890007
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"x": 0.39999999999999997,
"y": 0.39999999999999997,
"z": 1
},
"_layer": 33554432,
@ -31113,7 +31113,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 21.99
"z": 137.314
},
"_id": ""
},
@ -31220,16 +31220,16 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -0.129,
"y": 3.394,
"x": -3.03302122120067,
"y": -1.528613512875836,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
"z": 0.8338858220671682,
"w": 0.5519369853120581
},
"_lscale": {
"__type__": "cc.Vec3",
@ -31242,7 +31242,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
"z": 113
},
"_id": ""
},
@ -31329,7 +31329,7 @@
},
{
"__type__": "cc.Node",
"_name": "card1",
"_name": "card3",
"_objFlags": 0,
"_parent": {
"__id__": 1430
@ -31349,21 +31349,21 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 26.526,
"y": 1.98,
"x": -12.830759912490066,
"y": 23.30065827542296,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": -0.15867505421111816,
"w": 0.9873308600317822
"z": 0.7447717764560711,
"w": 0.6673192646660727
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"x": 0.4000000000000001,
"y": 0.4000000000000001,
"z": 1
},
"_layer": 33554432,
@ -31371,7 +31371,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": -18.26
"z": 96.279
},
"_id": ""
},
@ -33596,7 +33596,7 @@
"__id__": 1325
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 1551
@ -35805,7 +35805,7 @@
},
"_type": 0,
"_fillType": 0,
"_sizeMode": 1,
"_sizeMode": 0,
"_fillCenter": {
"__type__": "cc.Vec2",
"x": 0,
@ -36133,8 +36133,8 @@
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.9981347984218669,
"w": 0.06104853953485691
"z": 0,
"w": 1
},
"_lscale": {
"__type__": "cc.Vec3",
@ -36147,13 +36147,13 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 173
"z": 0
},
"_id": ""
},
{
"__type__": "cc.Node",
"_name": "card3",
"_name": "card1",
"_objFlags": 0,
"_parent": {
"__id__": 1664
@ -36173,16 +36173,16 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -24.198,
"y": -6.47,
"x": 24.806126429248025,
"y": 3.472779229401567,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0.19072333151821552,
"w": 0.9816438309359423
"z": -0.9912155402515417,
"w": 0.13225639025712246
},
"_lscale": {
"__type__": "cc.Vec3",
@ -36195,7 +36195,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 21.99
"z": -164.8
},
"_id": ""
},
@ -36302,21 +36302,21 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": -0.129,
"y": 3.394,
"x": -0.28558609795538814,
"y": -3.38442278396991,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": 0,
"w": 1
"z": 0.9981347984218669,
"w": 0.06104853953485691
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"x": 0.4000000000000002,
"y": 0.4000000000000002,
"z": 1
},
"_layer": 33554432,
@ -36324,7 +36324,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": 0
"z": 173
},
"_id": ""
},
@ -36411,7 +36411,7 @@
},
{
"__type__": "cc.Node",
"_name": "card1",
"_name": "card3",
"_objFlags": 0,
"_parent": {
"__id__": 1664
@ -36431,21 +36431,21 @@
},
"_lpos": {
"__type__": "cc.Vec3",
"x": 26.526,
"y": 1.98,
"x": -26.569580518379894,
"y": 1.2674648229151444,
"z": 0
},
"_lrot": {
"__type__": "cc.Quat",
"x": 0,
"y": 0,
"z": -0.15867505421111816,
"w": 0.9873308600317822
"z": 0.9759167619387474,
"w": 0.21814324139654248
},
"_lscale": {
"__type__": "cc.Vec3",
"x": 0.4,
"y": 0.4,
"x": 0.3999999999999999,
"y": 0.3999999999999999,
"z": 1
},
"_layer": 33554432,
@ -36453,7 +36453,7 @@
"__type__": "cc.Vec3",
"x": 0,
"y": 0,
"z": -18.26
"z": 154.8
},
"_id": ""
},
@ -38678,7 +38678,7 @@
"__id__": 1559
},
"_children": [],
"_active": true,
"_active": false,
"_components": [
{
"__id__": 1785

2
assets/10001/src/game/logic/TeenPattiePlayerLogic.ts

@ -271,7 +271,7 @@ export class TeenPattiePlayerLogic extends Component {
//桌子显示加号
private showJia(status: boolean) {
this.own.active = !status;
this.jia.active = status;
// this.jia.active = status;
}
private tw: Tween<Node>;

80
assets/10001/src/game/logic/TeenpattieFaPaiEffectLogic.ts

@ -1,4 +1,4 @@
import { Component, Node, Tween, UITransform, Vec3, _decorator, find, tween, v3 } from "cc";
import { Camera, Component, Node, Quat, Tween, UITransform, Vec3, _decorator, find, macro, tween, v3 } from "cc";
import { TeenPattieEventType } from "../../tool/TeenPattieEventType";
import { TeenPattieCommData } from "../TeenPattieCommData";
import { TeenPattieCommTool } from "../../tool/TeenPattieCommTool";
@ -9,35 +9,14 @@ import { TeenPattiePlayerLogic } from "./TeenPattiePlayerLogic";
/**游戏发牌逻辑 */
export class TeenpattieFaPaiEffectLogic extends Component{
//牌的落点 Position
private pos_1:number[][] = [[-355.6,109,0],[-365,84,0],[-381.7,62.4,0]]; //1号位玩家
private pos_2:number[][] = [[-421.3,-72.8,0],[-406.9,-94.4,0],[-403.5,-120.6,0]]; //2号位玩家
private pos_3:number[][] = [[-42,-100,0],[-0.3,-95,0],[42,-100,0]]; //3号位玩家
private pos_4:number[][] = [[356,-126.4,0],[360.5,-100,0],[376.2,-79,0]]; //4号位玩家
private pos_5:number[][] = [[334,63.5,0],[314.8,81.6,0],[305.1,106.2,0]]; //5号位玩家
private pos_6:number[][] = [[4.5,125.7,0],[-21.4,119,0],[-48.6,123.8,0]]; //6号位玩家
/**牌的位置 */
private pos:number[][][] = [];
private _pos:number[][][] = [];
private pos:Vec3[][] = [];
private _pos:Vec3[][] = [];
//牌的旋转角度 Rotation
private rot_1:number[] = [88,68,45.6]; //1号位玩家
private rot_2:number[] = [-44,-61,-80.4]; //2号位玩家
private rot_3:number[] = [7.1,0,-10]; //3号位玩家
private rot_4:number[] = [78.8,59.4,37.6]; //4号位玩家
private rot_5:number[] = [136,115,95.8]; //5号位玩家
private rot_6:number[] = [15.2,-7,-25.2]; //6号位玩家
/**牌的旋转 */
private rot:number[][] = [];
private _rot:number[][] = [];
//牌的缩放 Scale
private scr_1:Vec3 = v3(0.4,0.4,1); //1号位玩家
private scr_2:Vec3 = v3(0.4,0.4,1); //2号位玩家
private scr_3:Vec3 = v3(1.2,1.2,1); //3号位玩家 自己
private scr_4:Vec3 = v3(0.4,0.4,1); //4号位玩家
private scr_5:Vec3 = v3(0.4,0.4,1); //5号位玩家
private scr_6:Vec3 = v3(0.4,0.4,1); //6号位玩家
/**牌的缩放 */
private scr:Vec3[] = [];
private _scr:Vec3[] = [];
@ -47,9 +26,6 @@ export class TeenpattieFaPaiEffectLogic extends Component{
/**牌的节点 */
private cardNode:Node[] = [];
private canvas:UITransform
private anch:Vec3;
onLoad(): void {
this.fapai = find("fx_fapai",this.node);
for(let i = 0;i<this.fapai.children.length;i++){
@ -57,13 +33,12 @@ export class TeenpattieFaPaiEffectLogic extends Component{
}
this.playerTotal = TeenPattieCommData.getInstance().totalPlayer;
this.canvas = this.fapai?.getComponent(UITransform);
// this.canvas = find("UIRoot")?.getComponent(UITransform);
this.anch = v3(-this.canvas.width / 2,-this.canvas.height / 2,0);
this.getCoinNodeWorldPosition();
}
/**牌的世界坐标位置 */
private getCoinNodeWorldPosition(){
const total:number = TeenPattieCommData.getInstance().totalPlayer
const total:number = TeenPattieCommData.getInstance().totalPlayer;
if(this._pos.length >= total && this._rot.length >= total && this._scr.length >= total){
this.pos = this._pos;
this.rot = this._rot;
@ -72,15 +47,13 @@ export class TeenpattieFaPaiEffectLogic extends Component{
}
for(let i=1;i<=total;i++){
const list = find(`Player${i}/own/card/list`,this.node);
let card_pos:number[][] = [];
let card_pos:Vec3[] = [];
let card_rot:number[] = [];
let card_scr:Vec3 = null;
for(let c=1;c<=3;c++){
const card = list.getChildByName(`card${c}`);
let uiTran:UITransform = card?.getComponent(UITransform);
const posa = uiTran.convertToWorldSpaceAR(this.anch);
const pos = card.getWorldPosition();
card_pos.push([pos.x,pos.y,pos.z]);
card_pos.push(pos);
const angle = card.eulerAngles;
card_rot.push(angle.z);
card_scr = card.scale;
@ -101,29 +74,8 @@ export class TeenpattieFaPaiEffectLogic extends Component{
this.pos = [];
this.rot = [];
this.scr = [];
// this.getCoinNodeWorldPosition();
this.pos.push(this.pos_1)
this.pos.push(this.pos_2)
this.pos.push(this.pos_3)
this.pos.push(this.pos_4)
this.pos.push(this.pos_5)
this.pos.push(this.pos_6)
this.rot.push(this.rot_1)
this.rot.push(this.rot_2)
this.rot.push(this.rot_3)
this.rot.push(this.rot_4)
this.rot.push(this.rot_5)
this.rot.push(this.rot_6)
this.scr.push(this.scr_1)
this.scr.push(this.scr_2)
this.scr.push(this.scr_3)
this.scr.push(this.scr_4)
this.scr.push(this.scr_5)
this.scr.push(this.scr_6)
this.getCoinNodeWorldPosition();
}
onDestroy(): void {
@ -188,12 +140,6 @@ export class TeenpattieFaPaiEffectLogic extends Component{
const playerCount:any[] = TeenPattieCommData.getInstance().allKanPlayerCard || [];
this.playerTotal = playerCount.length;
let getItemIndex = (seatId:number)=>{
// for(let i=0;i<playerCount.length;i++){
// if(playerCount[i].SeatId == seatId){
// return i
// }
// }
// return -1
const playerLogic:TeenPattiePlayerLogic = find(`Player${seatId}`,this.node)?.getComponent(TeenPattiePlayerLogic);
for(let i=0;i<this.playerTotal;i++){
if(playerLogic.data?.SeatId == playerCount[i].SeatId){
@ -203,7 +149,7 @@ export class TeenpattieFaPaiEffectLogic extends Component{
return -1;
}
//需要删除的
let pos_items:number[][][] = [];
let pos_items:Vec3[][] = [];
let rot_items:number[][] = [];
let scr_items:Vec3[] = [];
for(let i=1;i<=TeenPattieCommData.getInstance().totalPlayer;i++){
@ -294,7 +240,7 @@ export class TeenpattieFaPaiEffectLogic extends Component{
/**设置坐标 */
private setPosition(banker:number,itCard:number):Vec3{
let p:Vec3 = null;
p = v3(this.pos[banker][itCard][0],this.pos[banker][itCard][1],this.pos[banker][itCard][2]);
p = this.pos[banker][itCard];
return p;
}
/**设置旋转 */
@ -327,7 +273,7 @@ export class TeenpattieFaPaiEffectLogic extends Component{
const p = v3(pos);
const r = v3(rot);
const s = v3(sca);
this.twPos = tween(node).to(time,{position:p,eulerAngles:r,scale:s},{onComplete:(target:any)=>{
this.twPos = tween(node).to(time,{worldPosition:p,eulerAngles:r,worldScale:s},{onComplete:(target:any)=>{
if(this.clockwise){
banker--;

Loading…
Cancel
Save