void Start() { poi = GameObject.FindGameObjectWithTag("poi").GetComponent <pyhsicsOfItems>(); myi = GameObject.FindGameObjectWithTag("myin").GetComponent <myInput>(); gro = GameObject.FindGameObjectWithTag("gro").GetComponent <groundCollision>(); kaleo = GameObject.FindGameObjectWithTag("kaleo").GetComponent <kaleCollisionController>(); }
// Use this for initialization void Start() { input = GetComponent <myInput>(); swipeIt.currentScore = 0; startText.text = ""; scoreText.text = ""; StartCoroutine(countdown()); }
void Assign(GameObject Player) { myi = GameObject.FindGameObjectWithTag("myin").GetComponent <myInput>(); myi.KnowMe(Player); gro = GameObject.FindGameObjectWithTag("gro").GetComponent <groundCollision>(); gro.KnowMe(Player, myi); poi = GameObject.FindGameObjectWithTag("poi").GetComponent <pyhsicsOfItems>(); poi.knowMe(Player, gro.gameObject, ballObj); Player.GetComponent <MyCharacterController>().poi = poi; }
public static string GetControlData(string para1, string para2) { List <DynamicControl> ControlList = new List <DynamicControl>(); myInput input1 = new myInput(); //input1.ID = "con001"; //input1.MyType = input1.GetType().Name; input1.DisplayText = "k001"; ControlList.Add(input1); myInput input2 = new myInput(); //input2.ID = "con002"; //input2.MyType = input2.GetType().Name; input2.DisplayText = "k002"; input2.InputValue = "1000K"; ControlList.Add(input2); myRadio radio1 = new myRadio(); //radio1.ID = "con003"; //radio1.MyType = radio1.GetType().Name; radio1.GroupName = "group1"; radio1.DisplayText = "r001"; radio1.ItemList.Add(new myItem("male", "1")); radio1.ItemList.Add(new myItem("female", "0")); ControlList.Add(radio1); myCheckbox checkbox1 = new myCheckbox(); //checkbox1.ID = "con004"; //checkbox1.MyType = checkbox1.GetType().Name; checkbox1.GroupName = "group2"; checkbox1.DisplayText = "cb001"; checkbox1.ItemList.Add(new myItem("red", "R")); checkbox1.ItemList.Add(new myItem("yellow", "Y")); checkbox1.ItemList.Add(new myItem("blue", "B")); ControlList.Add(checkbox1); myProgressbar progressbar1 = new myProgressbar(); //progressbar1.ID = "con005"; //progressbar1.MyType = progressbar1.GetType().Name; progressbar1.DisplayText = "完成率"; progressbar1.Min = 0; progressbar1.Max = 100; progressbar1.Current = 20; ControlList.Add(progressbar1); string JsonStr = JsonConvert.SerializeObject(ControlList); return(JsonStr); }
// Use this for initialization void Start() { input = GetComponent <myInput>(); obstacles = new List <GameObject>(); commandList = new List <gesture>(); playerVehicle = Instantiate(playerVehicle, startingPosition, transform.rotation) as GameObject; if (facebook.name != "") { usernameUI.GetComponent <Text>().text = facebook.name; } SetDifficulty(chickenRoad.difficulty); modeUI.GetComponent <Text>().text = chickenRoad.levelTitle; if (chickenRoad.tutorials != "none") { showTutorial = true; tutorials = chickenRoad.tutorials; } isHowToPlay = chickenRoad.crHowToPlay; levelObstacles = chickenRoad.levelObstacles; if (levelObstacles.Equals("FREEPLAY")) { isFreePlay = true; AddRandomObstacle(); } else { // build obstacle list for (int i = 0; i < levelObstacles.Length; i++) { convertToObstacle(levelObstacles[i]); } } StartCoroutine(StartGame()); }
// Use this for initialization void Start() { input = GetComponent <myInput>(); // temporary fix to eliminating the hack chickenRoad.hacked = false; // setting locked levels for visual people string lockedText = "Locked - Level "; ColorBlock temp = buttons[0].GetComponent <Button>().colors; temp.colorMultiplier = 5f; // 0 == free play, 1-9 == levels // free play and level 1 unlocked by default // locks levels for (int i = chickenRoad.highestLevelBeaten + 2; i <= 9; i++) { buttons[i].GetComponentInChildren <Text>().text = lockedText + i; buttons[i].GetComponent <Image>().color = Color.red; buttons[i].GetComponent <Button>().colors = temp; } }
public void KnowMe(GameObject player, myInput mi) { characterController = player.GetComponent <MyCharacterController>(); inputManager = mi; }
// Use this for initialization void Start() { text = GetComponent <Text>(); touch = GetComponent <myInput>(); }