public Engine() { _timerTracker = new TimerTracker(); _nodeCreationService = new NodeCreationService(_timerTracker); _calculator = new StatisticsCalculator(); _CSVWriteService = new CSVWriteService(); }
private void Awake() { blockMovementTimerID = gameObject.GetInstanceID() + "Block Movement Timer"; TimerTracker.AddTimer(blockMovementTimerID, 0f, null, null); deactivateColliderTimerID = gameObject.GetInstanceID() + "Deactivate Collider Timer"; TimerTracker.AddTimer(deactivateColliderTimerID, 0f, () => EnableCollider = true, null); FaceDirection(initialFacingDirection); }
public Run() { var nextSecond = MilliUntilNextSecond(); var timerTracker = new TimerTracker() { StartDate = DateTime.Now.AddMilliseconds(nextSecond), Interval = 1000, Number = 0 }; timer = new Timer(TimerCallback, timerTracker, nextSecond, -1); }
protected override void Awake() { base.Awake(); itemUseCooldownTimerID = gameObject.GetInstanceID() + "Item Use Cooldown Timer"; TimerTracker.AddTimer(itemUseCooldownTimerID, 0f, null, null); shieldComponent?.SetToUpperLimit(); if (!inventories.Contains(DefaultInventory)) { inventories.Add(DefaultInventory); } SteamPunkConsole.GetCommandsFromType(GetType()); }
private void Awake() { Follow.PhysicsController.CanMove = false; float angle = Random.value * 360f; float startSpeed = Random.Range(minStartSpeed, maxStartSpeed); Follow.PhysicsController.SetVelocity( angle.DegreeAngleToVector2() * startSpeed); idleWaitTimerID = "Idle Wait Timer" + gameObject.GetInstanceID(); TimerTracker.AddTimer(idleWaitTimerID, 0f, StartFollowing, null); pickupTrail = Instantiate(pickupTrailPrefab, transform.position, Quaternion.identity, ParticleGenerator.holder); pickupTrail.SetTarget(transform); Color col = Color.white; pickupTrail.SetColor(col); pickupGlow.color = col; }
private void Update() { if (IsWaiting) { return; } if (following) { Follow.TriggerUpdate(); } else { Vector3 velocity = Follow.PhysicsController.CurrentVelocity; if (velocity == Vector3.zero) { TimerTracker.SetTimer(idleWaitTimerID, idleWaitDuration); } } }
protected bool UseItem(Item.Type type) { bool used = false; int amountUsed = 0; switch (type) { default: break; case Item.Type.RepairKit: used = true; amountUsed = 1; break; } if (used) { TimerTracker.SetTimer(itemUseCooldownTimerID, itemUseCooldownDuration); OnItemUsed?.Invoke(type, amountUsed); } return(used); }
public void Activate() { if (isActivated || ignore) { return; } if (!isRepeatable && activationCount > 0) { return; } if (isTimedPrompt) { PR.PromptSendRequest(text, text); TimerTracker.SetTimer(text, promptDuration); TimerTracker.SetFinishAction(text, Deactivate); } else { PR.PromptSendRequest(text, text); } SetIsActivated(true); activationCount++; }
private void Awake() { blockMovementTimerID = gameObject.GetInstanceID() + "Block Movement Timer"; TimerTracker.AddTimer(blockMovementTimerID, 0f, null, null); }