} = true; //Only used on the server public override void Awake() { base.Awake(); playerNetworkActions = GetComponent <PlayerNetworkActions>(); playerMove = GetComponent <PlayerMove>(); playerSprites = GetComponent <PlayerSprites>(); registerPlayer = GetComponent <RegisterPlayer>(); dynamicItemStorage = GetComponent <DynamicItemStorage>(); OnConsciousStateChangeServer.AddListener(OnPlayerConsciousStateChangeServer); registerPlayer.AddStatus(this); }
} = true; //Only used on the server public override void EnsureInit() { if (init) { return; } init = true; base.EnsureInit(); playerNetworkActions = GetComponent <PlayerNetworkActions>(); playerMove = GetComponent <PlayerMove>(); playerSprites = GetComponent <PlayerSprites>(); registerPlayer = GetComponent <RegisterPlayer>(); itemStorage = GetComponent <ItemStorage>(); equipment = GetComponent <Equipment>(); playerScript = GetComponent <PlayerScript>(); OnConsciousStateChangeServer.AddListener(OnPlayerConsciousStateChangeServer); registerPlayer.AddStatus(this); }
} = true; //Only used on the server private void Awake() { base.Awake(); OnConsciousStateChangeServer.AddListener(OnPlayerConsciousStateChangeServer); }