public PlayerAction UpdateWith(PlayerAction action) { this.makePasse = action.makePasse; this.posPasse = action.posPasse; this.pointDep = action.pointDep; this.pointPasse = action.pointPasse; this.copyBtnValues(action.btnValues); return this; }
private void initializeActions(List<Player> players) { int i = 1; foreach (Player player in players) { int idAction = this.id * 1000 + i; PlayerAction pAction = new PlayerAction(idAction, Vector3.zero, new List<string>()); actions[player] = pAction; } }
public override bool passe(ref Vector3 pointPasse) { Debug.Log("In PC:" + Player.Name + " - point:" + arrivalPoint); pointPasse = arrivalPointPasse; if (phaseAnimation && Vector3.Distance(arrivalPointPasse, transform.position) < player.ZonePasse * 5) { PlayerAction action = new PlayerAction(0, this.PointDeplacement, this.arrivalPointPasse, this.Player.Button_Values, transform.position); this.replayController.setPlayerAction(this.Player, action); return true; } return false; }
private void setMyParam(PlayerAction action) { this.PointDeplacement = action.Deplacement; this.Player.Button_Values = action.ButtonValues; if (action.MakePasse) { this.makePass = true; this.PointPasse = action.Passe; this.posPass = action.PosPasse; } else this.makePass = false; }
public void setPlayerAction(Player player, PlayerAction action) { actions[player] = actions[player].UpdateWith(action); }
public void setPlayerAction(Player player, PlayerAction action) { this.actualRound.setPlayerAction(player, action); }
// -- En développement private void GetMyParam(PlayerAction action) { this.PointDeplacement = action.Deplacement; this.PointPasse = action.Passe; this.Player.Button_Values = action.ButtonValues; start_Anim(false); }
public override void OnStartAnimation() { PlayerAction action = new PlayerAction(0, this.PointDeplacement, this.Player.Button_Values); this.replayController.setPlayerAction(this.Player, action); base.OnStartAnimation(); }