// Use this for initialization void Start() { // 一球分のプレイ履歴を記録する Trace = new List <MyTrace>(); // RacketController, PlayerControllerを取得 racketController = Racket.GetComponent <RacketController>(); playerController = Player.GetComponent <PlayerController>(); scoreBoardController = ScoreBoard.GetComponent <ScoreBoardController>(); // まずは初めのトレーニングセットから始める currentTrainingIndex = 0; // DATAはPLAYDATA/の配下に日付ごとにディレクトリを作成する。 // 起動時にしかディレクトリを制御しないため、アプリ起動中に日付が変わっても同じディレクトリ使われる。 // /PLAYDATA ディレクトリがなければ作成 if (!Directory.Exists("PLAYDATA")) { Directory.CreateDirectory("PLAYDATA"); } // 日付から作った ディレクトリ(例: PLAYDATA/20181019/ がなければ作成 directoryName = System.DateTime.Now.ToString("PLAYDATA/yyyyMMdd"); if (!Directory.Exists(directoryName)) { Directory.CreateDirectory(directoryName); } // 初期状態である Servedへ移行 StartServe(); }
// Use this for initialization void Start() { rb = GetComponent <Rigidbody2D>(); shootable = true; player = FindObjectOfType <RacketController>(); lM = FindObjectOfType <LivesManager>(); }
private void Awake() { rb = this.GetComponent <Rigidbody>(); respawnLocation = transform.position; fakeConsole = GameObject.Find("FakeConsole").GetComponent <Text>(); racket = GameObject.Find("PlayerRacket").GetComponent <RacketController>(); }
public void SetUpRacket() { iRacket = Substitute.For <IRacket>(); racketController = new RacketController(); racketController.SetIRacket(iRacket); racketController.SetLocalDeltaTime(1f); racketController.SetRacketVelocity(1f); racketController.SetRacketLimit(10); }
public override void Activate() { GameObject player = GameObject.FindGameObjectWithTag(playerTag); if (player == null) { return; } RacketController racketController = player.GetComponent <RacketController>(); if (racketController == null) { return; } racketController.ScaleHorizontally(scaleFactor); }
// Use this for initialization void Start() { player = FindObjectOfType <RacketController>(); }
//-------------------------------- void Start() { racketController = new RacketController(); racketController.SetIRacket(this); SetPosition(transform.position); }