void Awake() { AI = this; MyPlayer = GameObject.FindGameObjectWithTag("Player"); playerTR = MyPlayer.transform; playerSC = MyPlayer.GetComponent <sc_player> (); }
void Start() { playerSC = sc_AICenter.AI.GetPlayerSC(); playerTR = sc_AICenter.AI.GetPlayerTR(); canvasTR = transform.GetChild(0); myText = GetComponentInChildren <Text> (); }
void Start() { AI = sc_AICenter.AI; playerTR = AI.GetPlayerTR(); scPlayer = playerTR.GetComponent <sc_player> (); areaMask = 1 << LayerMask.NameToLayer("Area"); wallMask = 1 << LayerMask.NameToLayer("Wall"); for (int i = 0; i < transform.childCount; i++) { Transform border = transform.GetChild(i); if (i < 2) { myBorder [i] = border.position.y; } else { myBorder [i] = border.position.x; } if (i != 2 && i != 3) { Destroy(border.gameObject); } else { Destroy(border.GetComponent <SpriteRenderer> ()); } } StartCoroutine(CheckPlayerInArea()); StartCoroutine(WaitSendArea()); }
override protected void Start() { base.Start(); scDialog = GetComponent <sc_NpcDialog> (); AI = sc_AICenter.AI; playerTR = AI.GetPlayerTR(); scPlayer = AI.GetPlayerSC(); }
void Awake() { GameObject myPlayer = GameObject.FindGameObjectWithTag("Player"); scPlayer = myPlayer.GetComponent <sc_player> (); scOpt = myPlayer.GetComponentInChildren <sc_Option>(); playerTR = myPlayer.transform; PlotFlags.Clear(); PF_Listener.Clear(); ReadStoryAsset(); }
virtual protected void Start() { scPlayer = sc_AICenter.AI.GetPlayerSC(); scCam = sc_God.MainCam.scCam; for (int i = 0; i < transform.childCount; i++) { Transform nowChild = transform.GetChild(i); if (nowChild.tag == "Tag_EHint") { anim_EHint = nowChild.GetComponent <Animator> (); break; } } if (anim_EHint == null) { anim_EHint = GetComponentInChildren <Animator> (); } playerMask = 1 << LayerMask.NameToLayer("Player"); }