Example #1
0
    void init()
    {
        Action_Manager        action        = GameObject.Find("Action_Manager").GetComponent <Action_Manager>();
        Sound_Manager         sound_Manager = GameObject.Find("Sound_Manager").GetComponent <Sound_Manager>();
        PlayerControl_Manager playerControl = GameObject.Find("PlayerControl").GetComponent <PlayerControl_Manager>();


        if (action)
        {
            Debug.Log("action 잡음");
        }
        if (sound_Manager)
        {
            Debug.Log("sound_Manager 잡음");
        }
        if (playerControl)
        {
            Debug.Log("playerControl 잡음");
        }


        //action.init();
        //sound_Manager.init();
        //playerControl.init();
    }
Example #2
0
 private void Start()
 {
     PM = GameObject.Find("Manager").GetComponent <PlayerControl_Manager>();
     AM = GameObject.Find("Manager").GetComponent <Action_Manager>();
     AM.trashCan.Add(this.gameObject);
     if (PM.right)
     {
         GetComponent <Rigidbody2D>().velocity = transform.right * speed;
     }
     else
     {
         GetComponent <Rigidbody2D>().velocity = transform.right * (-speed);
     }
 }