Example #1
0
 void Start()
 {
     thePlayer = FindObjectOfType <Player_Movement>();
     theCamera = FindObjectOfType <Main_Camera>();
     theFade   = FindObjectOfType <FadeManager>();
     BGM       = FindObjectOfType <BGMManager>();
 }
Example #2
0
    IEnumerator LoadWaitCoroutine()
    {
        yield return(new WaitForSeconds(1.0f));

        thePlayer = FindObjectOfType <Player_Movement>();
        bounds    = FindObjectsOfType <Bound>();
        theCamera = FindObjectOfType <Main_Camera>();
        theFade   = FindObjectOfType <FadeManager>();
        theMenu   = FindObjectOfType <Menu>();
        cam       = FindObjectOfType <Camera>();

        Color color = thePlayer.GetComponent <SpriteRenderer>().color;

        color.a = 1f;
        thePlayer.GetComponent <SpriteRenderer>().color = color;

        theCamera.target = GameObject.Find("Player_Swordman");
        theMenu.GetComponent <Canvas>().worldCamera = cam;

        for (int i = 0; i < bounds.Length; i++)
        {
            if (bounds[i].boundName == thePlayer.currentMapName)
            {
                bounds[i].SetBound();
                break;
            }
        }

        theFade.FadeIn();
    }
Example #3
0
    void Start()
    {
        theCamera = FindObjectOfType <Main_Camera>();
        thePlayer = FindObjectOfType <Player_Movement>();


        if (startPoint == thePlayer.currentMapName)
        {
            theCamera.transform.position = new Vector3(this.transform.position.x, this.transform.position.y, theCamera.transform.position.z);
            thePlayer.transform.position = this.transform.position;
        }
    }
Example #4
0
 private void Awake()
 {
     MC = GetComponent <Main_Camera>();
 }
Example #5
0
 // Use this for initialization
 void Start()
 {
     bound     = GetComponent <BoxCollider2D>();
     theCamera = FindObjectOfType <Main_Camera>();
 }