void Awake() { if (player_first == null || player_id < player_first.player_id) { player_first = this; } players_list.Add(this); rigid = GetComponent <Rigidbody>(); collide = GetComponentInChildren <CapsuleCollider>(); character_attr = GetComponent <PlayerCharacterAttribute>(); character_combat = GetComponent <PlayerCharacterCombat>(); character_craft = GetComponent <PlayerCharacterCraft>(); character_inventory = GetComponent <PlayerCharacterInventory>(); character_jump = GetComponent <PlayerCharacterJump>(); character_swim = GetComponent <PlayerCharacterSwim>(); character_anim = GetComponent <PlayerCharacterAnim>(); facing = transform.forward; prev_pos = transform.position; fall_vect = Vector3.down * fall_speed; }
private void Awake() { character = GetComponent <PlayerCharacter>(); character_attr = GetComponent <PlayerCharacterAttribute>(); }