public void CmdSpawnConstruction(int rotation) { PlayerResourceScript resource = gameObject.GetComponent <PlayerResourceScript>(); if (resource.UseResource(10)) { CmdRealBuild(rotation); } }
private void Start() { resource = player.GetComponent <PlayerResourceScript>(); }