protected virtual void OnAwake() { enemyDir = 0; if (player == Player.unit) { canMove = false; } else { canMove = true; } rigid2d = GetComponent <Rigidbody2D>(); foreach (Transform child in transform) { if (child.tag == "Feet") { jumpDetection = child.GetComponent <JumpDetection>(); } } // if (tag == "Ice" || tag == "Odetta") { charactor = GetComponent <CharactorBase>(); } }
void Start() { ph = PhotonView.Get(this.transform.gameObject); this.rigid = GetComponent<Rigidbody>(); if (ph.isMine) { this.camera = this.transform.Find("Camera").GetComponent<Camera>(); this.jump = GetComponent<JumpDetection>(); } else { this.transform.Find("Camera").gameObject.active = false; } }