示例#1
0
    // Use this for initialization
    void Start()
    {
        ScrGameManager2 scrGM2 = GameObject.Find("GameManager").GetComponent <ScrGameManager2>();

        screenPosXMin = scrGM2.ScreenPosXMin;
        screenPosXMax = scrGM2.ScreenPosXMax;
    }
示例#2
0
    // Use this for initialization
    void Start()
    {
        soldier = gameObject.transform.parent.gameObject;

        trajectory = gameObject.GetComponent <LineRenderer>();

        ScrGameManager2 scrGM2 = GameObject.Find("GameManager").GetComponent <ScrGameManager2>();

        screenPosXMin = scrGM2.ScreenPosXMin;
        screenPosXMax = scrGM2.ScreenPosXMax;
    }
    // Use this for initialization
    void Start()
    {
        ScrGameManager2 scrGM2 = GameObject.Find("GameManager").GetComponent <ScrGameManager2>();

        screenPosXMin = scrGM2.ScreenPosXMin;
        screenPosXMax = scrGM2.ScreenPosXMax;

        isMoveDown  = true;
        isMoveLeft  = false;
        isMoveRight = false;

        startPosition = gameObject.transform.position;
        goalPosition  = new Vector3(startPosition.x, 3.84f, startPosition.z);
    }