コード例 #1
0
ファイル: Goal.cs プロジェクト: Lasconik/MastersOfHockey
    // Use this for initialization
    void Start()
    {
        GameObject gc = GameObject.Find("GameController");

        matchInfo = gc.GetComponent <MatchInfo> ();
        faceOff   = gc.GetComponent <FaceOff> ();
    }
コード例 #2
0
 public static FaceOff GetFaceOffReviews(string rawJson)
 {
     try
     {
         var     results       = new FaceOff();
         dynamic dynamicObject = JsonConvert.DeserializeObject(rawJson);
         results.negative.rating   = (int)dynamicObject.negative.rating.Value;
         results.negative.comments = (string)dynamicObject.negative.comments.Value;
         results.negative.headline = (string)dynamicObject.negative.headline.Value;
         results.positive.rating   = (int)dynamicObject.positive.rating.Value;
         results.positive.comments = (string)dynamicObject.positive.comments.Value;
         results.positive.headline = (string)dynamicObject.positive.headline.Value;
         return(results);
     }
     catch (Exception)
     {
         return(null);
     }
 }
コード例 #3
0
 public PowerReviewFaceOffResponse()
 {
     FaceOff = new FaceOff();
 }
コード例 #4
0
 void Start()
 {
     faceOff = GameObject.FindGameObjectWithTag("GameController").GetComponent <FaceOff>();
 }