public InstallmentMovement(Guid id, decimal value, int months, EMonths startMonth, string description, EMovementCategory category, EMovementType type, Guid accountId, Guid userId, DateTime createdOn, DateTime?updatedOn) : base(id, value, description, category, type, accountId, userId, createdOn, updatedOn) { Months = months; StartMonth = startMonth; }
/// <summary> /// Updates the movement type of our character. If we return true, it means that our movement type has /// changed /// </summary> /// <returns></returns> private void SetMovementType(EMovementType NewMovementType) { if (NewMovementType == CurrentMovementType) { return; } int PreviousMovementType = (int)CurrentMovementType; EndMovementType(CurrentMovementType); CurrentMovementType = NewMovementType; switch (CurrentMovementType) { case EMovementType.STANDING: RemainingDoubleJumps = DoubleJumpCount; break; case EMovementType.CROUCH: AssociatedCollider.ColliderSize.y = CrouchingHeight; break; case EMovementType.IN_AIR: break; } CharacterAnimator.SetInteger(ANIM_MOVEMENT_STATE, (int)CurrentMovementType); CharacterAnimator.SetTrigger(ANIM_MOVEMENT_STATE_UPDATED); }
public void SetMovementType(EMovementType type) { this.Type = type; if (this.Type != EMovementType.Credit) { this.Value *= -1; } }
public CreateMovementCommand(Guid userId, Guid accountId, string description, decimal value, EMovementCategory category, EMovementType type) { UserId = userId; AccountId = accountId; Description = description; Value = value; Type = type; Category = category; }
public Movement(Guid id, decimal value, string description, EMovementCategory category, EMovementType type, Guid accountId, Guid userId, DateTime createdOn) : base(id, createdOn, null) { Value = value; Description = description; Category = category; Type = type; AccountId = accountId; UserId = userId; }
public Movement(decimal value, string description, EMovementCategory category, EMovementType type, Guid accountId, Guid userId) : base() { Type = type; Value = Type == EMovementType.Credit ? value : (value * -1); Description = description; Category = category; AccountId = accountId; UserId = userId; }
public CreateInstallmentMovementCommand(Guid userId, Guid accountId, string description, decimal value, int months, EMonths startMonth, EMovementCategory category, EMovementType type) { UserId = userId; AccountId = accountId; Description = description; Value = value; Category = category; Type = type; StartMonth = startMonth; Months = months; }
/// <summary> /// Call this method when leaving a movement state /// </summary> /// <param name="MovementTypeToEnd"></param> private void EndMovementType(EMovementType MovementTypeToEnd) { switch (MovementTypeToEnd) { case EMovementType.STANDING: break; case EMovementType.CROUCH: AssociatedCollider.ColliderSize.y = StandingHeight; break; case EMovementType.IN_AIR: break; } }
// Устанавливает класс управляющий персонажем public void setMovementType(EMovementType movementType) { if (this.movementType.Equals(movementType)) return; this.movementType=movementType; switch(movementType){ case EMovementType.inground: currentMovement = ingroundMovement; break; case EMovementType.inwater: currentMovement = inwaterMovement; break; case EMovementType.underwater: currentMovement = underwaterMovement; break; } }
public void StartMovement(Vector2 source, Vector2 destination, EMovementType eMovementType) { startPos = spriteNode.Position = source; destPos = eMovementType == EMovementType.Jump ? source : destination; // set destination equal to source if jumping if (eMovementType != EMovementType.Jump && Mathf.Abs(destPos.x - startPos.x) > 10) { isLookingRight = spriteNode.Scale.x > 0; bool isMovingRight = destPos.x - startPos.x > 0; if (isLookingRight != isMovingRight) { FlipEntity(); } } this.eMovementType = eMovementType; isRunning = true; animStopwatch.Reset(); animStopwatch.Start(); }
public InstallmentMovement(decimal value, int months, EMonths startMonth, string description, EMovementCategory category, EMovementType type, Guid accountId, Guid userId) : base(value, description, category, type, accountId, userId) { Months = months; StartMonth = startMonth; }
void Start() { actions = playerHands.GetComponent<Actions>(); movementType = EMovementType.inground; // инициализируем контроллеры движения ingroundMovement = gameObject.GetComponent<IngroundMovements>(); if (ingroundMovement==null) ingroundMovement = gameObject.AddComponent<IngroundMovements>(); ingroundMovement.setUp(actions, mouseLook, fovKick, headBob, jumpBob, attackController); underwaterMovement = gameObject.GetComponent<UnderwaterMovements>(); if (underwaterMovement == null) underwaterMovement = gameObject.AddComponent<UnderwaterMovements>(); underwaterMovement.setUp(actions, mouseLook, fovKick, headBob, jumpBob, attackController); inwaterMovement = gameObject.GetComponent<InwaterMovements>(); if (inwaterMovement == null) inwaterMovement = gameObject.AddComponent<InwaterMovements>(); inwaterMovement.setUp(actions, mouseLook, fovKick, headBob, jumpBob, attackController); currentMovement = ingroundMovement; }