// Start is called before the first frame update void Start() { myAgentState = agent.GetComponent <AgentState>(); myGetFood = agent.GetComponent <GetFood>(); myGetLaid = agent.GetComponent <GetLaid>(); this.gameObject.transform.localScale = new Vector3(sightRange * 2, sightRange, this.gameObject.transform.localScale.z); }
// Start is called before the first frame update void Start() { _AudioSource = GetComponent <AudioSource>(); Money = StartMoney; SpecialSaleText.SetActive(false); _Stage = Stage.Lot; CreateClassStart();//食材クラスと料理クラスの生成 Debug.Log("クラスの生成完了"); RC = GetComponent <RandomCuisine>(); //DecisionCooking();//作る料理の決定 //Debug.Log("作る料理の決定完了"); CreateImageBox();//動かすImageBoxの生成//ImageBox初期化処理 Debug.Log("ImageBoxの生成完了"); GF = GetComponent <GetFood>(); Money_int = new int[ImageBox.GetLength(0), ImageBox.GetLength(1)]; TIB = GetComponent <TransformImageBox>();//食材移動scriptを取得 TIB.SetUp(ImageBox, FS, Money_int); Debug.Log("食材移動の準備完了"); //Money_int = TIB.Money_int; PD = GetComponent <PunchDetection>(); //パンチを取得 MH = GetComponent <MotherHund>(); //主婦の手を取得 MH.SetUp(ImageBox); C = GetComponent <Clock>();//時計の表示スクリプトを取得 C.TimerSetUp(LimitTime); SM = GetComponent <SlotManeger>();//時計の表示スクリプトを取得 SM.SlotSetUp(CC); TM = GetComponent <TutorialManeger>();//チュートリアル表示管理スクリプトを取得 TM.TutorialSetUp((int)LimitTime, StartMoney, TutorialTimerMax); //Debug.Log(t[1]); sw = true; StartMainSw = true; SpecialSaleSw = new bool[2]; SpecialSaleSw[0] = true; SpecialSaleSw[1] = true; Timer = 0; MotherHundCoolTime = 5.5f;//ここは絶対に.5であること TutorialTimer = 0; }
// Start is called before the first frame update void Start() { this.serial = new SerialPort(portName, baurate, Parity.None, 8, StopBits.One); this.serial2 = new SerialPort(portName2, baurate, Parity.None, 8, StopBits.One); this.serial3 = new SerialPort(portName3, baurate, Parity.None, 8, StopBits.One); try { this.serial.Open(); Scheduler.ThreadPool.Schedule(() => ReadDataA()).AddTo(this); this.serial2.Open(); Scheduler.ThreadPool.Schedule(() => ReadDataB()).AddTo(this); this.serial3.Open(); Scheduler.ThreadPool.Schedule(() => ReadDataC()).AddTo(this); } catch (Exception e) { Debug.Log("can not open serial port"); } GetFood = GameObject.Find("Main Camera").GetComponent <GetFood>(); }