public override void Create(CharData charData, EntityViewManager viewMap, Vector3 Pos, Quaternion rotation) { _viewMap = viewMap; gameObj = new CreatureEntity(); gameObj.Init(charData, GlobalClient.GameManager.LogicManager); GameObject obj = GlobalClient.prefabData["PlayerActor1"]; gameGo = GameObject.Instantiate(obj, Pos, rotation) as GameObject; actor = gameGo.GetComponent <Actor>(); actor.viewObj = this; if (Game.GameManager.instance.IsHostPlayer()) { actor.SetMaterial(false, false); gameObj.campType = ECampType.Red; } else { actor.SetMaterial(true, false); gameObj.campType = ECampType.Blue; } gameGo.name = charData.entityName; gameTrans = gameGo.transform; gameObj.Position = gameTrans.position; gameObj.Direction = gameTrans.forward; gameObj.Speed = 0.5f; }
public override void Create(CharData charData, EntityViewManager viewMap, Vector3 Pos, Quaternion rotation) { _viewMap = viewMap; gameObj = new CreatureEntity(); gameObj.Init(charData, GlobalClient.GameManager.LogicManager); GameObject obj = GlobalClient.prefabData["Soccer"]; GameObject sp = GameObject.Find("SpawnPoint2"); gameGo = GameObject.Instantiate(obj, sp.transform.position, sp.transform.rotation) as GameObject; gameGo.name = charData.entityName; gameTrans = gameGo.transform; }