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(); }
public void init() { MainPlayer = transform.Find("Player/MainPlayer").gameObject.GetComponent <Character_State>(); SubPlayer = transform.Find("Player/SubPlayer").gameObject.GetComponent <Character_State>(); Main_position = MainPlayer.gameObject.GetComponent <Transform>().position; Sub_position = SubPlayer.gameObject.GetComponent <Transform>().position; animator = transform.Find("Player/MainPlayer/Main_Slime").gameObject.GetComponent <Animator>(); Btn_restart = transform.Find("Restart").gameObject; AM = this.gameObject.GetComponent <Action_Manager>(); }
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); } }
public bool DownJump; //하향점프 가능한지 상태 표현 //getset 설정부분 private void Start() { action_Manager = transform.root.Find("Manager").gameObject.GetComponent <Action_Manager>(); }
private void Start() { AM = transform.root.Find("Manager").GetComponent <Action_Manager>(); onAnimator = this.gameObject.GetComponent <Animator>(); }
private void Awake() { AM = GameObject.Find("Manager").GetComponent <Action_Manager>(); }
private void Start() { AM = transform.root.Find("Manager").GetComponent <Action_Manager>(); }