//constructor// public Player(float posx, float posy, int framelimit, int pt, Action <int, int, int, int> upf, Action <int, float, float, int> upp, Action <float, float, float, float> upb, int gear) { this.posx = posx; this.posy = posy; direction = 0; frame = 1; this.framelimit = framelimit; this.upf = upf; this.upp = upp; this.upb = upb; this.pt = pt; Debug.Log("player inicilized"); this.gear = gear; this.iniciate(); //switch case to set enum type// switch (pt) { case 1: type = playernum.Player1; break; case 2: type = playernum.Player2; break; case 3: type = playernum.Player3; break; case 4: type = playernum.Player4; break; case 5: type = playernum.Player5; break; case 6: type = playernum.Player6; break; } }
//constructor// public Player(float posx, float posy, int framelimit, int pt, Action <int, int, int, int> upf, Action <int, float, float, int> upp) { this.posx = posx; this.posy = posy; direction = 0; frame = 0; this.framelimit = frame; this.upf = upf; this.upp = upp; this.pt = pt; //switch case to set enum type// switch (pt) { case 1: type = playernum.Player1; break; case 2: type = playernum.Player2; break; case 3: type = playernum.Player3; break; case 4: type = playernum.Player4; break; case 5: type = playernum.Player5; break; case 6: type = playernum.Player6; break; } }