//void ServerEvent(ClientSyncEvent _event) //{ //} public void Init() { m_CatObj.AddComponent <TurnCat>(); m_GhostObj.AddComponent <TurnCat>(); mCatAni = m_CatObj.GetComponent <CatAnimatorController>(); mGhostAni = m_GhostObj.GetComponent <GhostAnimatorController>(); mAnimatorController = mCatAni; }
public void ChangeModel(PlayerControl.PlayerType _type) { Debug.Log("name=" + gameObject.name + " type=" + _type.ToString()); if (_type == PlayerControl.PlayerType.Cat) { m_CatObj.SetActive(true); m_GhostObj.SetActive(false); mAnimatorController = mCatAni; } else { m_CatObj.SetActive(false); m_GhostObj.SetActive(true); mAnimatorController = mGhostAni; } }