public override void SetCorrectSubLineValue() { foreach (GameObject subLine in lines) { Line lCode = subLine.GetComponent <Line>(); if (lCode.tag == "speed") { MovingPlatform platform = controllingObject.GetComponent <MovingPlatform>(); lCode.SetSubButtonText(platform.speed.ToString()); } else if (lCode.tag == "move") { MultiObjectController controller = controllingObject.GetComponent <MultiObjectController>(); lCode.SetSubButtonText(controller.move.ToString()); } else if (lCode.tag == "spin") { MultiObjectController controller = controllingObject.GetComponent <MultiObjectController>(); lCode.SetSubButtonText(controller.spin.ToString()); } else if (lCode.tag == "accessCode") { lCode.SetSubButtonText("0"); } else if (lCode.tag == "overrideDefaults") { lCode.SetSubButtonText("false"); } else if (lCode.tag == "decryptKey") { lCode.SetSubButtonText("0"); } } }
public void EnabledMove() { MultiObjectController controller = controllingObject.GetComponent <MultiObjectController>(); controller.move = true; GetComponent <AudioSource>().enabled = true; }
public override void UpdateRealVariables() { foreach (GameObject subLine in lines) { Line lCode = subLine.GetComponent <Line>(); if (lCode.tag == "move") { MultiObjectController controller = controllingObject.GetComponent <MultiObjectController>(); controller.move = bool.Parse(lCode.GetSubText()); } else if (lCode.tag == "spin") { MultiObjectController controller = controllingObject.GetComponent <MultiObjectController>(); controller.spin = bool.Parse(lCode.GetSubText()); } } }
public void DisableMove() { MultiObjectController controller = controllingObject.GetComponent <MultiObjectController>(); controller.move = false; }