예제 #1
0
    // Use this for initialization
    void Start()
    {
        love = 15;
        pickUp = false;
        timer = 0;

        boy = GameObject.FindGameObjectWithTag ("boy");
        mom = GameObject.FindGameObjectWithTag ("mom");
        momTransform = mom.GetComponent<Transform> ();
        momMove = mom.GetComponent<MomMovement> ();
        momShoot = mom.GetComponent<MomShooting> ();
        player = GameObject.FindGameObjectWithTag ("Player");
        playerRB = player.GetComponent<Rigidbody2D> ();
        playerMove = player.GetComponent<CharacterMovement> ();
    }
예제 #2
0
    // Use this for initialization
    void Start()
    {
        rb = GetComponent<Rigidbody2D> ();
        rb.velocity = new Vector2(10, 0);

        heart = GameObject.FindGameObjectWithTag ("heart");

        mom = GameObject.FindGameObjectWithTag ("mom");
        momTransform = mom.GetComponent<Transform> ();
        momShooting = mom.GetComponent<MomShooting> ();

        player = GameObject.FindGameObjectWithTag ("Player");
        playerTransform = player.GetComponent<Transform> ();
        charMove = player.GetComponent<CharacterMovement> ();
        playerRB = player.GetComponent<Rigidbody2D> ();

        boy = GameObject.FindGameObjectWithTag ("boy");
        boyTrans = boy.GetComponent<Transform> ();
    }