public void SetResources() { woodAmount = 5000; keysBehavior = RenderManager.ActiveCamera2D.Owner.FindComponent <KeysBehavior>(); ui = UIBehavior.ui; map = Map.map; fog = FogOfWar.fog; PathDrawable draw = new PathDrawable(); draw.SetPlayer(this, path); Owner.AddComponent(draw); }
public void SetResources() { woodAmount = 5000; if (isLocalPlayer) { networkService = (Owner.Scene as NetworkedScene).networkService; keysBehavior = RenderManager.ActiveCamera2D.Owner.FindComponent <KeysBehavior>(); ui = UIBehavior.ui; map = Map.map; fog = FogOfWar.fog; PathDrawable draw = new PathDrawable(); draw.SetPlayer(this, path); Owner.AddComponent(draw); } }