public override void InitEquipment(Pathea.PeEntity entity, ItemAsset.ItemObject itemObj) { base.InitEquipment(entity, itemObj); m_Equip.SetEnergySheild(this); m_EnergyAttr = m_ItemObj.GetCmpt <ItemAsset.Energy>(); if (null != m_EnergyAttr) { m_Entity.SetAttribute(AttribType.Shield, m_EnergyAttr.energy.current); m_EnergyAttr.SetMax(m_MaxEnergy); } m_Entity.SetAttribute(AttribType.ShieldMax, m_MaxEnergy); lastUsedTime = Time.time; m_Time = new UTimer(); m_Time.ElapseSpeed = -1f; m_Time.Second = GameConfig.NetUpdateInterval; m_LastNetValue = enCurrent; if (!m_Active) { DeactiveSheild(); } }
// Start is called before the first frame update void Start() { lastFishCool = UTimer.Initialize(lastFishTimer, this, OnLastFishTimer); afterLastFishCool = UTimer.Initialize(timeAfterLastFish, this, OnAfterLastFish); lastFishCool.start(); }
public AttFilter_Time(float intervalTime) { mIntervalTime = intervalTime; mTimer = new UTimer(); mTimer.ElapseSpeed = -1; mTimer.Second = mIntervalTime; }
// Start is called before the first frame update void Start() { spiderReelAudio = FMODUnity.RuntimeManager.CreateInstance(spiderMoveAudioEvent); isMoving = false; spiderReelAudio.start(); spiderReelAudio.setPaused(true); timerIdle = UTimer.Initialize(timeToBeIdle, this, StartIdle); }
public Action_HandChangeEquipHold() { if (null == m_FixErrorTimer) { m_FixErrorTimer = new UTimer(); m_FixErrorTimer.ElapseSpeed = -1f; } }
// Use this for initialization void Start() { Timer = new PETimer(); Timer.ElapseSpeed = 0; PlayTime = new UTimer(); PlayTime.ElapseSpeed = 1; }
public override void OnDragOut() { base.OnDragOut(); mNoticeTimer = new UTimer(); mNoticeTimer.ElapseSpeed = -1f; mNoticeTimer.Second = 1; }
// Start is called before the first frame update void Start() { bobberTimer = UTimer.Initialize(0.1f, this, setBobberKinematicOnFalse); bendyRod.GetComponent <Renderer>().enabled = false; setCableComponentValues(); setBendySpringJointNormalState(); unsetBendyPhysic(); }
// Start is called before the first frame update void Start() { fishingManagement = GetComponent <FishingManagement>(); poseFishing = GetComponent <RepresentationPositionFishing>(); hapticDistance = GetComponent <HapticDistance>(); hapticDistance.enabled = false; fishEscapingTimer = UTimer.Initialize(5, this, moveEscapingFish); }
// Start is called before the first frame update void Start() { fishEscapingTimer = UTimer.Initialize(moveFrequence, this, moveEscapingFish); splashTimer = UTimer.Initialize(timeBeforeColorSplash, this, CreateSplash); Vector3 force = new Vector3(0, 250, 0) * GetComponent <Rigidbody>().mass; GetComponent <Rigidbody>().AddForce(force); fishEscapingTimer.start(); }
public override void InitEquipment(Pathea.PeEntity entity, ItemAsset.ItemObject itemObj) { base.InitEquipment(entity, itemObj); m_Equip.SetJetPackLogic(this); m_ItemAttr = itemObj.GetCmpt <ItemAsset.JetPkg>(); m_Time = new UTimer(); m_Time.ElapseSpeed = -1f; m_Time.Second = GameConfig.NetUpdateInterval; m_LastNetValue = enCurrent; }
private void Awake() { //timer to activate immediately, the neighbour sleeps unitl the end of the timer timerBetweenRestSigne = UTimer.Initialize(settings.InitialTimeBetween2Checks, this, Checking); //timer to activate after the last one, the neighbour switch on its sign and let it visible until the end of the timer timerBetweenSigneComing = UTimer.Initialize(settings.InitialTimeDtection, this, Coming); //timer to activate after the last one, the neighbour check if the player is making some noise until the end of the timer timerBetweenComingDeparture = UTimer.Initialize(settings.InitialReactionTime, this, Departure); }
protected override void InitWindow() { if (mInit) { return; } base.InitWindow(); mTimer = new UTimer(); mTimer.ElapseSpeed = 1; mTimer.Second = 0; mInit = true; }
public override void InitEquipment(Pathea.PeEntity entity, ItemAsset.ItemObject itemObj) { base.InitEquipment(entity, itemObj); m_Energy = m_ItemObj.GetCmpt <ItemAsset.Energy>(); if (null != m_Energy) { m_Entity.SetAttribute(AttribType.EnergyMax, m_Energy.valueMax); m_Entity.SetAttribute(AttribType.Energy, m_Energy.floatValue.current); } m_LastNetValue = m_Entity.GetAttribute(AttribType.Energy); m_Time = new UTimer(); m_Time.ElapseSpeed = -1f; m_Time.Second = GameConfig.NetUpdateInterval; }
// Use this for initialization new void Start() { base.Start(); m_Info = CSInfoMgr.m_AssemblyInfo; CreateEnergySheild(); m_CurEnergySheild.onEnterTrigger += OnEnterTrigger; m_CurEnergySheild.onExitTrigger += OnExitTrigger; m_triggerTimer = new UTimer(); m_triggerTimer.ElapseSpeed = 1; }
public static string GetStrHhMm(this UTimer t) { UTimer.TimeStruct ts = t.TickToTimeStruct(t.Tick); int h = ts.Hour; int m = ts.Minute; s_strBuff.Length = 0; s_strBuff.Append((char)('0' + (h / 10))); s_strBuff.Append((char)('0' + (h % 10))); s_strBuff.Append(':'); s_strBuff.Append((char)('0' + (m / 10))); s_strBuff.Append((char)('0' + (m % 10))); return(s_strBuff.ToString()); }
UTimer CreateTimerVo(float delay, Action <object[]> action, int loop, bool ignoreTimeScale, params object[] args) { UTimer actionVo = new UTimer(); actionVo.action = action; actionVo.args = args; actionVo.ignoreTimeScale = ignoreTimeScale; actionVo.delay = delay; actionVo.loop = loop; if (ignoreTimeScale) { actionVo.time = Time.realtimeSinceStartup; } else { actionVo.time = Time.time; } return(actionVo); }
UTimer CreateTimerVo(float delay, Action action, int loop, bool ignoreTimeScale, bool isClearWhenChangeMap) { UTimer actionVo = new UTimer(); actionVo.simpleAction = action; actionVo.args = null; actionVo.ignoreTimeScale = ignoreTimeScale; actionVo.delay = delay; actionVo.loop = loop; actionVo.isClearWhenChangeMap = isClearWhenChangeMap; if (ignoreTimeScale) { actionVo.time = Time.realtimeSinceStartup; } else { actionVo.time = Time.time; } return(actionVo); }
public static void Invoke(Action a, TimeMode mode, float time) { if (time == 0f) { a(); } else { var timer = new UTimer(mode); timer.Duration = time; timer.TimerElapsed += () => { timer.Stop(); if (a != null) { a(); } timer = null; }; timer.Start(); } }
public override void InitEquipment(PeEntity entity, ItemAsset.ItemObject itemObj) { base.InitEquipment(entity, itemObj); m_Equip.SetEnergyGunLogic(this); m_ItemAmmoAttr = itemObj.GetCmpt <ItemAsset.GunAmmo>(); if (null != m_ItemAmmoAttr) { if (null != m_Magazine) { if (m_ItemAmmoAttr.count < 0) { m_ItemAmmoAttr.count = (int)magazineSize; } m_Magazine.m_Value = m_ItemAmmoAttr.count; } } m_Time = new UTimer(); m_Time.ElapseSpeed = -1f; m_Time.Second = GameConfig.NetUpdateInterval; m_LastNetValue = enCurrent; }
public void MinusTime(UTimer timer) { m_Tick -= timer.m_Tick; }
// Start is called before the first frame update void Start() { timerOnFil = UTimer.Initialize(tempsSurLeFil, this, debutDebatFil); //moucheVole = FMODUnity.RuntimeManager.CreateInstance(moucheVoleEvent); //moucheVole.start(); }
// Start is called before the first frame update void Start() { clignotement = UTimer.Initialize(frequenceIndication, this, startClignotement, true); }
public override void OnCreate() { base.OnCreate(); mInstance = this; m_UTimer = new UTimer(); }
// Start is called before the first frame update void Start() { FishTimer = UTimer.Initialize(0, this, StartShoeFish); //UnfishTimer = UTimer.Initialize(0, this, ReleaseFish); }
void Awake() { timerCops = UTimer.Initialize(timeBeforeArrieeDesCops, this, LaunchPoliceAnimation); timerEndScene = UTimer.Initialize(timeSceneGameOver, this, changeScene); }
void ChangeArvhive(Pathea.PeGameSummary summary) { if (summary != null) { switch (summary.sceneMode) { case Pathea.PeGameMgr.ESceneMode.Story: mGametypeText.text = PELocalization.GetString(10007); //mSeedIDText.text = "Unknown"; //mSeedTitleText.text = "Area:"; mSeedRoot.SetActive(false); break; case Pathea.PeGameMgr.ESceneMode.Adventure: mGametypeText.text = PELocalization.GetString(10008); mSeedIDText.text = summary.seed; mSeedTitleText.text = PELocalization.GetString(8000361) + ":"; mSeedRoot.SetActive(true); break; case Pathea.PeGameMgr.ESceneMode.Build: mGametypeText.text = PELocalization.GetString(10009); mSeedIDText.text = summary.seed; mSeedTitleText.text = PELocalization.GetString(8000361) + ":"; mSeedRoot.SetActive(true); break; case Pathea.PeGameMgr.ESceneMode.Custom: mGametypeText.text = PELocalization.GetString(10222); mSeedIDText.text = PELocalization.GetString(8000558); mSeedTitleText.text = PELocalization.GetString(8000557); mSeedRoot.SetActive(false); break; default: break; } mInfoGrid.repositionNow = true; UTimer tmp_playtimer = new UTimer(); tmp_playtimer.Second = summary.playTime; if (tmp_playtimer.Day < 1) { mPlayTimeText.text = tmp_playtimer.FormatString("hh:mm:ss"); } else { mPlayTimeText.text = tmp_playtimer.FormatString("D days hh:mm:ss"); } PETimer tmp_gametimer = PETimerUtil.GetTmpTimer(); tmp_gametimer.Second = summary.gameTime; mGameTimeText.text = tmp_gametimer.FormatString("hh:mm:ss AP"); mSaveTex.enabled = true; mSaveTex.mainTexture = (summary.screenshot != null) ? summary.screenshot : mAutoTex; } else { mGametypeText.text = ""; mSeedIDText.text = ""; // mBorimText.text = ""; mPlayTimeText.text = ""; mGameTimeText.text = ""; mSaveTex.enabled = false; mSaveTex.mainTexture = null; } }
public void AddTime(UTimer timer) { m_Tick += timer.m_Tick; }
//timer : the time took by the timer to switch <finished> to true //obj : need a monobehaviour reference to lanch the StartCoroutine function, almost every time 'this' (i know, a little ugly) //debug : if you want to see the timer developpement public static UTimer Initialize(float time, MonoBehaviour obj, UnityAction function, bool debug = false) { UTimer returnVal = new UTimer(time, obj, function, debug); return(returnVal); }
public Stopwatch() { name = ""; timer = new UTimer(); timer.Reset(); }