// Start is called before the first frame update void Start() { characterUIController = gameObject.GetComponent <CharacterUIController>(); // Load up the characters before anything else happens foreach (GameObject character in characters) { character.GetComponent <CharacterController>().LoadCharacter(); } InitiateCharacter(currentCharacter.index); }
public void Init() { engine = GetComponent <CharacterInputController>(); engine.refreshDitance = new CharacterInputController.RefreshDistance(RefreshDistance); ui_controller = GetComponent <CharacterUIController>(); controlGame = GameObject.Find("GameControl").GetComponent <ControlGame>(); startPos = transform.position; MapControl mapControl = GameObject.Find("MapControl").GetComponent <MapControl>(); createPlatform = mapControl.CreatePlatform; }