示例#1
0
    // Use this for initialization
    void Start()
    {
        //get the player dino and store in player
        player = GameObject.FindGameObjectWithTag("Player");

        //get the MotionControllers from the player and the cpu
        playerMotion = player.GetComponent<OldDinoMoveScript>() as OldDinoMoveScript;

        //turn off the motion scripts for the player and the cpu
        playerMotion.enabled = false;

        //invoke the CountDown method
        InvokeRepeating ("CountDown", 1.0f, 1.0f);
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        leftArrow.transform.position = Vector3.zero;
        leftArrow.transform.localScale = Vector3.zero;

        rightArrow.transform.position = Vector3.zero;
        rightArrow.transform.localScale = Vector3.zero;

        //call the resize function for both arrows
        Resize(leftArrow, leftArrowPos);
        Resize(rightArrow, rightArrowPos);

        //assign the motion script to the variable
        if(player.GetComponent<OldDinoMoveScript>())
        {
            motionConScript = player.GetComponent<OldDinoMoveScript>();
        }
    }