private void spawnPlayer() { GameObject playerGO = new GameObject("_Player"); DontDestroyOnLoad(playerGO); EposGame.playerActor = playerGO.AddComponent <CActor>(); }
private void DEBUG_findAlternatePlayerGO(string name) { CActor[] actors = FindObjectsOfType <CActor>(); foreach (CActor actor in actors) { if (actor.gameObject.name == name) { EposGame.playerActor = actor; return; } } }
public void init() { actor = this.gameObject.GetComponent <CActor>(); cc = this.gameObject.GetComponent <CharacterController>(); //RequireComponent already crates one! }
public void setTargetActor(CActor actor) { playerActor = actor; this.cMovement = actor.GetComponent <CMovement>(); this.cCombat = actor.GetComponent <CCombat>(); }
public void setTargetActor(CActor actor) { actorMode.setTargetActor(actor); }