public override void Init(int theID, int modelID, Transform root) { this.id = theID; this.transform = root; ChuanSongMenNPC chuanSongMenNPC = DataReader <ChuanSongMenNPC> .Get(this.hearthDataID); if (chuanSongMenNPC == null) { return; } this.SetCollider(root, chuanSongMenNPC.triggeredRange); this.ApplyDefaultState(); this.SetModel(root, modelID); }
protected void SetPositionAndRotation() { ChuanSongMenNPC chuanSongMenNPC = DataReader <ChuanSongMenNPC> .Get(this.hearthDataID); if (chuanSongMenNPC == null) { return; } if (chuanSongMenNPC.position.get_Count() >= 3) { this.transform.set_position(PosDirUtility.ToTerrainPoint(chuanSongMenNPC.position)); } if (chuanSongMenNPC.face.get_Count() >= 3) { this.transform.set_eulerAngles(PosDirUtility.ToEulerAnglesFromErrorFormatData(chuanSongMenNPC.face)); } }