// Use this for initialization void Start() { dist = GetComponent <CalcDistance>(); invStatus = GameObject.Find("Player").GetComponent <Inventory>(); player = GameObject.Find("Player"); if (gameObject.name.Contains("Tong")) { icon = GameObject.Find("Tongs Icon"); objName = "PlayerTong"; } else if (gameObject.name.Contains("WaterPitcher")) { icon = GameObject.Find("Pitcher Icon"); objName = "PlayerPitcher"; } else if (gameObject.name.Contains("Litmus")) { icon = GameObject.Find("Litmus Icon"); objName = "PlayerLitmus"; } if (icon == null) { print("CheckInventoryEquip"); } if (icon.activeSelf) { icon.SetActive(false); } //invStatus.inventory.SetActive(false); //obj = GameObject.Find(objName); }
void Start() //what happens in the beginning of the game. { T_ActivatedOpen = true; T_ActivatedClose = false; dist = GetComponent <CalcDistance>(); animator = GetComponent <Animator> (); doorOpen = false; }
// Use this for initialization void Start() { dist = GetComponent <CalcDistance> (); burner = GameObject.Find("burner"); scale = GameObject.Find("balance"); player = GameObject.Find("Player"); cup = GameObject.Find("WaterPitcher"); pos = gameObject.transform.position; }
public override void OnInspectorGUI() { base.OnInspectorGUI(); CalcDistance myTarget = (CalcDistance)target; if (GUILayout.Button("Calc")) { myTarget.Calc(); } }
// Use this for initialization void Start() { fire = GetComponentInChildren <ParticleSystem>(); //flame = gameObject.transform.Find("flame").gameObject; // list = GameObject.Find("Check 4"); isFireActive = false; // flame.SetActive(false); fire.Stop(); // list.SetActive(false); dist = GetComponent <CalcDistance>(); }
// Use this for initialization void Start() { flip = false; // freeze = GetComponent<FirstPersonController>(); scaleData = GameObject.Find("ScaleInfo"); //scale = GameObject.Find("balance"); dist = GetComponent <CalcDistance>(); text = GameObject.Find("Weight").GetComponent <Text>(); scaleData.SetActive(false); player = GameObject.Find("Player"); }
// Use this for initialization void Start() { showerHead = GameObject.Find("ShowerHead"); player = GameObject.Find("Player"); showerHead.GetComponent <ParticleSystem>().Stop(); showerHead.GetComponent <ParticleSystem>().Clear(); dist = GetComponent <CalcDistance>(); gameObject.GetComponent <BoxCollider>().enabled = false; currentTime = Time.time; timeStamp = currentTime; }
public static void TestPoint3DMain() { Point3D A = new Point3D(12.3, 123.4, 44); Point3D B = new Point3D(15, 16.1, 2); Point3D C = new Point3D(16.3, 13.4, 21); System.Console.WriteLine(A.ToString() + " " + B.ToString() + " " + C.ToString()); System.Console.WriteLine("Distance between point A and point B is: " + CalcDistance.Distance(A, B)); Path ABC = new Path(); ABC.AddPoint(A); ABC.AddPoint(A); ABC.AddPoint(B); ABC.AddPoint(C); System.Console.WriteLine(ABC.ToString()); System.Console.WriteLine("Deleting point at index 1."); ABC.DeletePoint(1); System.Console.WriteLine(ABC.ToString()); Path BEER = new Path(); BEER.AddPoint(B); BEER.AddPoint(new Point3D(12, 16, 13)); BEER.AddPoint(new Point3D(3, 20, 17)); BEER.AddPoint(new Point3D(6, 7, 4)); PathStorage.AddPath(ABC); PathStorage.AddPath(BEER); System.Console.WriteLine("Print Path Storage:"); PathStorage.PrintPathStorage(); System.Console.WriteLine("Remove first path(ABC)."); PathStorage.RemovePath(ABC); System.Console.WriteLine("Print Path Storage:"); PathStorage.PrintPathStorage(); System.Console.WriteLine("Save paths to the file."); PathStorage.SavePaths(); System.Console.WriteLine("Load paths from file. Print them."); PathStorage.LoadPaths(); PathStorage.PrintPathStorage(); }
public override void OnInspectorGUI() { base.OnInspectorGUI(); CalcDistance myTarget = (CalcDistance)target; if (GUILayout.Button("CalcDis")) { myTarget.CalcDis(); } if (GUILayout.Button("CalcAngle")) { myTarget.CalcAngle(); } if (GUILayout.Button("LookAt")) { myTarget.LookAt(); } }
// Use this for initialization void Start() { colliders = gameObject.GetComponents <BoxCollider>(); foreach (BoxCollider collider in colliders) { if (collider.isTrigger) { col = collider; } } col.enabled = false; player = GameObject.Find("Player"); fire = GameObject.Find("BunsenFlame").GetComponent <ParticleSystem>(); flame = gameObject.transform.Find("flame").gameObject; list = GameObject.Find("Check 4"); isFireActive = false; flame.SetActive(false); fire.Stop(); //list.SetActive(false); dist = GetComponent <CalcDistance>(); currentTime = Time.time; timeStamp = currentTime; }
static void Main(string[] args) { //Tilføjet printer til output IOutput Output = new Output(); Print Printer; IMonitors monitor = new Monitor(); ITransponderReceiver transponderDataReceiver = TransponderReceiverFactory.CreateTransponderDataReceiver(); IUpdate update; ICalcVelocity calcVelocity = new CalcVelocity();; ICalcCourse calcCourse = new CalcCourse(); ILog logger = new Logger(); ISeparation separation = new SeparationEvent(); ICalcDistance calcDistance = new CalcDistance(); var decoder = new DecodingWithEvent(transponderDataReceiver); //Kaldet bliver lagt her til eventet. Som en slags subscriber. update = new Update(decoder); //decoder.TrackDataReady += (o, trackArgs) => Printer = new Print(update,calculator,monitor,Output,trackArgs.TrackData); decoder.TrackDataReadyForCalculation += (o, trackArgs) => Printer = new Print(update, calcDistance, calcCourse, calcVelocity, logger, separation, monitor, Output, trackArgs.TrackData); System.Console.ReadLine(); }
// Use this for initialization void Start() { prompt = gameObject.transform.Find("Interaction Prompt").gameObject; if (prompt == null) { print("Hi"); } prompt.SetActive(false); dist = GetComponent <CalcDistance>(); equip = GetComponent <Equip>(); pDist = .3f; if (gameObject.name.Equals("LabCoat")) { pDist = .5f; } if (gameObject.name.Equals("Periodic Table")) { pDist = 1f; } currentTime = Time.time; timeStamp = currentTime; }
void Awake() { dist = GetComponent <CalcDistance>(); materials.Clear(); maskTexture = new Texture2D(2, 2, TextureFormat.ARGB32, false); outlineColor.a = 1.0f; maskTexture.SetPixel(0, 0, outlineColor); maskTexture.SetPixel(1, 0, outlineColor); maskTexture.SetPixel(0, 1, outlineColor); maskTexture.SetPixel(1, 1, outlineColor); maskTexture.Apply(); foreach (Renderer rend in GetComponentsInChildren <Renderer>()) { materials.Add(rend.material); } andThr = threshold; outAnt = outlineColor; maskNone = new Texture2D(2, 2, TextureFormat.ARGB32, false); maskNone.SetPixel(0, 0, new Color(0, 0, 0, 0)); maskNone.SetPixel(1, 0, new Color(0, 0, 0, 0)); maskNone.SetPixel(0, 1, new Color(0, 0, 0, 0)); maskNone.SetPixel(1, 1, new Color(0, 0, 0, 0)); maskNone.Apply(); if (outlineMode == OutlineMode.AllwaysOn) { ApplyEffect = true; } else { ApplyEffect = false; } }
// Use this for initialization void Start() { dist = GetComponent <CalcDistance>(); rHand = GameObject.Find("rightHand"); lHand = GameObject.Find("leftHand"); if (gameObject.name.Equals("Gloves")) { icon = GameObject.Find("GlovesIcon"); //list.SetActive(true); } else if (gameObject.name.Equals("SafetyGlasses")) { icon = GameObject.Find("GlassesIcon"); //list.SetActive(true); } else if (gameObject.name.Equals("LabCoat")) { icon = GameObject.Find("CoatIcon"); // list.SetActive(true); } icon.SetActive(false); //list.SetActive(false); player = GameObject.Find("Player"); }
internal static double CalcDiagonalXZ() { var distance = CalcDistance.CalcDistance2D(0, 0, Width, Depth); return(distance); }
internal static double CalcDiagonalXY() { var distance = CalcDistance.CalcDistance2D(0, 0, Width, Height); return(distance); }
internal static double CalcDiagonalYZ() { var distance = CalcDistance.CalcDistance2D(0, 0, Height, Depth); return(distance); }