private void ForcePuzzleReset() { PuzzleReset component = base.GetComponent <PuzzleReset>(); if (component != null) { component.DoReset(); component.ResetTimer(); } }
private void ForcePuzzleReset() { PuzzleReset component = (PuzzleReset)((Component)this).GetComponent <PuzzleReset>(); if (!Object.op_Inequality((Object)component, (Object)null)) { return; } component.DoReset(); component.ResetTimer(); }
public static void puzzlereset(ConsoleSystem.Arg arg) { if (arg.Player() == null) { return; } PuzzleReset[] puzzleResetArray = UnityEngine.Object.FindObjectsOfType <PuzzleReset>(); Debug.Log("iterating..."); PuzzleReset[] puzzleResetArray1 = puzzleResetArray; for (int i = 0; i < (int)puzzleResetArray1.Length; i++) { PuzzleReset puzzleReset = puzzleResetArray1[i]; Debug.Log(string.Concat("resetting puzzle at :", puzzleReset.transform.position)); puzzleReset.DoReset(); puzzleReset.ResetTimer(); } }
public override void Load(BaseNetworkable.LoadInfo info) { base.Load(info); if (info.fromDisk && info.msg.puzzleReset != null) { PuzzleReset component = base.GetComponent <PuzzleReset>(); if (component != null) { component.playersBlockReset = info.msg.puzzleReset.playerBlocksReset; if (component.playerDetectionOrigin != null) { component.playerDetectionOrigin.position = info.msg.puzzleReset.playerDetectionOrigin; } component.playerDetectionRadius = info.msg.puzzleReset.playerDetectionRadius; component.scaleWithServerPopulation = info.msg.puzzleReset.scaleWithServerPopulation; component.timeBetweenResets = info.msg.puzzleReset.timeBetweenResets; component.ResetTimer(); } } }
public override void Load(BaseNetworkable.LoadInfo info) { base.Load(info); if (!info.fromDisk || info.msg.puzzleReset == null) { return; } PuzzleReset component = (PuzzleReset)((Component)this).GetComponent <PuzzleReset>(); if (!Object.op_Inequality((Object)component, (Object)null)) { return; } component.playersBlockReset = (bool)((PuzzleReset)info.msg.puzzleReset).playerBlocksReset; if (Object.op_Inequality((Object)component.playerDetectionOrigin, (Object)null)) { component.playerDetectionOrigin.set_position((Vector3)((PuzzleReset)info.msg.puzzleReset).playerDetectionOrigin); } component.playerDetectionRadius = (float)((PuzzleReset)info.msg.puzzleReset).playerDetectionRadius; component.scaleWithServerPopulation = (bool)((PuzzleReset)info.msg.puzzleReset).scaleWithServerPopulation; component.timeBetweenResets = (float)((PuzzleReset)info.msg.puzzleReset).timeBetweenResets; component.ResetTimer(); }