Ejemplo n.º 1
0
 public void MovePlayer(Vector3 endPos, float stopDistance)
 {
     state = StateOfAction.Moving;
     agent.SetDestination(endPos);
     agent.stoppingDistance = stopDistance;
     //uniquement pour la next interaction n influe pas sur le deplacement whatsoever
     positionToGo = endPos;
 }
Ejemplo n.º 2
0
    public void AddDeplacement(List <Tile> path)
    {
        state = StateOfAction.Moving;
        foreach (Tile tile in path)
        {
            actionsToPerform.Add(new Sc_Deplacement(characterProperty.speed, this, tile));
        }

        //uniquement pour la next interaction n influe pas sur le deplacement whatsoever
        //positionToGo = endPos;
    }
Ejemplo n.º 3
0
 public void Interact()
 {
     state = StateOfAction.Interacting;
     if (onGoingInteraction.listOfUser.Count == 0)
     {
         onGoingInteraction.listOfUser.Add(player);
         onGoingInteraction.StartInteracting();
     }
     else
     {
         for (int i = 0; i < onGoingInteraction.listOfUser.Count; i++)
         {
             if (onGoingInteraction.listOfUser[i] != player)
             {
                 onGoingInteraction.listOfUser.Add(player);
                 onGoingInteraction.ReUpduateTiming();
             }
         }
     }
 }