コード例 #1
0
 void Awake()
 {
     moveArms    = transform.parent.GetComponent <MoveArms>();
     originalRot = transform.rotation;
     originalPos = transform.position;
     enabled     = false;
 }
コード例 #2
0
    // Start is called before the first frame update
    void Start()
    {
        playerMouse   = GameObject.Find("playerMouse");
        opponentMouse = GameObject.Find("opponentMouse");

        interfaceController     = GameObject.Find("GameController").GetComponent <InterfaceController>();
        armTwoScript            = GameObject.Find("ScientistArmTwo").GetComponent <MoveArms>();
        opponentMoveMouseScript = GameObject.Find("opponentMouse").GetComponent <MoveMouse>();
    }
コード例 #3
0
 // Start is called before the first frame update
 void Start()
 {
     wallHighlight           = this.transform.GetChild(0).gameObject;
     interfaceController     = GameObject.Find("GameController").GetComponent <InterfaceController>();
     gameCoreController      = GameObject.Find("GameController").GetComponent <GameCoreController>();
     eventManager            = GameObject.Find("EventManager").GetComponent <EventManager>();
     armTwoScript            = GameObject.Find("ScientistArmTwo").GetComponent <MoveArms>();
     opponentMoveMouseScript = GameObject.Find("opponentMouse").GetComponent <MoveMouse>();
 }
コード例 #4
0
 void Awake()
 {
     moveArms = GetComponent <MoveArms>();
     arms     = new Transform[2];
     for (int i = 0; i < transform.childCount; ++i)
     {
         arms[i] = transform.GetChild(i);
     }
     enabled = false;
 }
コード例 #5
0
 // Start is called before the first frame update
 void Start()
 {
     scientistArmOne       = GameObject.Find("ScientistArmOne");
     scientistArmTwo       = GameObject.Find("ScientistArmTwo");
     moveArmsOne           = scientistArmOne.GetComponent <MoveArms>();
     moveArmsTwo           = scientistArmTwo.GetComponent <MoveArms>();
     moveWall              = false;
     target                = transform.position;
     verticalWallMat       = Resources.Load("wallColor", typeof(Material)) as Material;
     horizontalWallMat     = Resources.Load("horizontalWallColor", typeof(Material)) as Material;
     matRenderer           = GetComponent <Renderer>();
     playerMoveMouseScript = GameObject.Find("playerMouse").GetComponent <MoveMouse>();
     playerMoveArmScript   = GameObject.Find("ScientistArmOne").GetComponent <MoveArms>();
 }
コード例 #6
0
    // Start is called before the first frame update
    void Start()
    {
        armTwoScript            = GameObject.Find("ScientistArmTwo").GetComponent <MoveArms>();
        opponentMoveMouseScript = GameObject.Find("opponentMouse").GetComponent <MoveMouse>();

        // playerClickMouseScript = playerMouse.GetComponent<ClickMouse>();
        // opponentClickMouseScript = opponentMouse.GetComponent<ClickMouse>();

        interfaceController = GameObject.Find("GameController").GetComponent <InterfaceController>();
        highlightMat        = Resources.Load("highlightColor", typeof(Material)) as Material;
        hintMat             = Resources.Load("hintColor", typeof(Material)) as Material;
        possibleMoves       = new List <string>();
        gameSquareMat       = Resources.Load("cubeColor", typeof(Material)) as Material;
        hintButtonScript    = GameObject.Find("HintButton").GetComponent <HintButton>();
    }
コード例 #7
0
    public void MoveOpponentWallInGUI(string colliderName)
    {
        GameObject wall     = GetUnusedOpponentWall();
        Collider   collider = GetCollider(colliderName);

        if (wall != null && collider != null)
        {
            TriggerOpponentWallIndicatorAnimation();

            //wall.transform.localScale = collider.transform.localScale;
            MoveWallsProgramatically moveWallsProgramatically = wall.GetComponent <MoveWallsProgramatically>();
            MoveArms moveArms = GameObject.Find("ScientistArmTwo").GetComponent <MoveArms>();
            wall.transform.localScale = moveWallsProgramatically.GetWallSize(collider.transform.localScale);
            moveWallsProgramatically.SetTarget(collider.transform.position, collider.transform.localScale);
            moveArms.moveArm = true;
            moveWallsProgramatically.moveWall = true;

            moveWallsProgramatically.SetIsOnBoard(true);
            collider.GetComponent <WallPlacement>().SetWallPlacedHere(true);

            SwitchTurnIndicatorToLocal();
        }
    }