Du kannst nicht mehr als 25 Themen auswählen
Themen müssen entweder mit einem Buchstaben oder einer Ziffer beginnen. Sie können Bindestriche („-“) enthalten und bis zu 35 Zeichen lang sein.
Dieses Repo ist archiviert. Du kannst Dateien sehen und es klonen, kannst aber nicht pushen oder Issues/Pull-Requests öffnen.
|
- using System;
- using System.Collections.Generic;
- using UnityEngine;
-
- namespace coa4u
- {
- /// <summary>
- /// Delays the action for the given amount of seconds.
- /// </summary>
- class ActionDelay : ActionInterval
- {
- protected float durationMin;
- protected float durationMax;
-
- public ActionDelay(float tgtDuration)
- : base(tgtDuration)
- {
- durationMin = tgtDuration;
- durationMax = tgtDuration;
- }
-
- public ActionDelay(float tgtDuration, float tgtDurationMax)
- : base(tgtDuration)
- {
- durationMin = tgtDuration;
- durationMax = tgtDurationMax;
- }
-
- /// <summary>
- /// This method is called at the action start.
- /// </summary>
- public override void start()
- {
- base.start();
- if (durationMax != null)
- {
- duration = UnityEngine.Random.Range(durationMin, durationMax);
- }
- }
- }
- }
|