36 lines
848 B
C#
36 lines
848 B
C#
|
using System.Collections;
|
||
|
using System.Collections.Generic;
|
||
|
using UnityEngine;
|
||
|
|
||
|
public class InitPlayer : MonoBehaviour
|
||
|
{
|
||
|
public JSONReader JSONReader;
|
||
|
public CharacterAin Character;
|
||
|
public Skill_Pick SkillPick;
|
||
|
// Start is called before the first frame update
|
||
|
void Start()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
// Update is called once per frame
|
||
|
void Update()
|
||
|
{
|
||
|
|
||
|
}
|
||
|
|
||
|
void Init(string id)
|
||
|
{
|
||
|
foreach (var npcData in JSONReader.npcDictionary.Values)
|
||
|
{
|
||
|
if (npcData.ID == int.Parse(id))
|
||
|
{
|
||
|
GameObject ob = Resources.Load<GameObject>(npcData.ResPath);
|
||
|
Character.ain = ob.GetComponent<Animator>();
|
||
|
SkillPick.CharacterAnimator= ob.GetComponent<Animator>();
|
||
|
Instantiate(ob, transform);
|
||
|
}
|
||
|
}
|
||
|
}
|
||
|
}
|