예제 #1
0
 // Start is called before the first frame update
 void Start()
 {
     maxScale = transform.localScale;
     timeLeft = interval;
     cc1      = GameObject.Find("Checker 1").gameObject.GetComponent <CheckerController>();
     cc2      = GameObject.Find("Checker 2").gameObject.GetComponent <CheckerController>();
 }
예제 #2
0
    void Start()
    {
        xpos       = xstart;
        ypos       = ystart;
        randomize  = 0;
        prevUDP    = 17; // some out of range number
        gridNumber = xpos + (ypos - 1) * 10;
        robot      = GameObject.Find("Robot").gameObject.GetComponent <RobotController>();
        ball       = GameObject.Find("Ball 1").gameObject.GetComponent <BallController>();
        // Initialize the reference for other game objects (Implementation Specific)
        ic1 = GameObject.Find("Indicator 1").gameObject.GetComponent <IndicatorController>();
        ic2 = GameObject.Find("Indicator 2").gameObject.GetComponent <IndicatorController>();
        ic3 = GameObject.Find("Indicator 3").gameObject.GetComponent <IndicatorController>();
        ic4 = GameObject.Find("Indicator 4").gameObject.GetComponent <IndicatorController>();
        ic5 = GameObject.Find("Indicator 5").gameObject.GetComponent <IndicatorController>();
        cc1 = GameObject.Find("Checker 1").gameObject.GetComponent <CheckerController>();
        cc2 = GameObject.Find("Checker 2").gameObject.GetComponent <CheckerController>();
        cc3 = GameObject.Find("Checker 3").gameObject.GetComponent <CheckerController>();
        cc4 = GameObject.Find("Checker 4").gameObject.GetComponent <CheckerController>();
        cc5 = GameObject.Find("Checker 5").gameObject.GetComponent <CheckerController>();

        timingBar = GameObject.Find("Timing Bar").gameObject.GetComponent <TimingBarFiveController>();

        // Define grid color
        color.r = 0.5f;
        color.g = 0.5f;
        color.b = 0.5f;

        Debug.Log("Test: Ball " + randomize.ToString());
        ignore = 0;
    }
예제 #3
0
        /// <summary>
        /// Creates the full package.
        /// </summary>
        /// <param name="obj">The object.</param>
        private static void CreateFullPackage(string[] obj)
        {
            CheckerController ch = new CheckerController();
            var          files   = ch.GetFiles();
            PackageMaker pMaker  = new PackageMaker(files, true);

            pMaker.MakePackage();
        }
예제 #4
0
 public void UnSelectChecker()
 {
     if (currentChecker)
     {
         currentChecker.SwitchToUnSelectedColor();
     }
     currentChecker = null;
 }
예제 #5
0
        /// <summary>
        /// Creates the assembly.
        /// </summary>
        /// <param name="arg">The argument.</param>
        private static void CreateAssembly(string[] arg)
        {
            CheckerController ch = new CheckerController();
            var          files   = ch.GetFiles().Where(x => x.IsAssembly);
            PackageMaker pMaker  = new PackageMaker(files, true);

            pMaker.MakePackage();
            var json = JsonConvert.SerializeObject(pMaker.Info);
        }
예제 #6
0
 public void SelectChecker(int x, int y, CheckerController theChecker)
 {
     if (matchState == MatchState.UnSelected)
     {
         currentChecker = theChecker;
         matchState     = MatchState.Selected;
     }
     else
     {
         UnSelectChecker();
         currentChecker = theChecker;
         matchState     = MatchState.Selected;
     }
 }
예제 #7
0
 public Grid(int x, int y, CheckerController theChecker)
 {
     this.x          = x;
     this.y          = y;
     this.theChecker = theChecker;
 }