示例#1
0
    // Use this for initialization
    void Start()
    {
        rb = gameObject.GetComponent <Rigidbody2D>();
        levelController = FindObjectOfType <LabBossController>();

        if (levelController.isRight)
        {
            rSpeed = speed;
        }
        else
        {
            rSpeed = -speed;
        }

        moveDir     = new Vector2(rSpeed, 0);
        rb.velocity = moveDir;
    }
示例#2
0
 // Use this for initialization
 void Start()
 {
     levelController = FindObjectOfType <LabBossController>();
 }