Skip to content

Commit

Permalink
0.3.7.837
Browse files Browse the repository at this point in the history
  • Loading branch information
gleblebedev committed Sep 1, 2024
1 parent 454f46c commit 199ab28
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 7 deletions.
2 changes: 1 addition & 1 deletion .config/dotnet-tools.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
]
},
"unofficial.Urho3DNet.Editor": {
"version": "0.3.7.832",
"version": "0.3.7.837",
"commands": [
"rbfx"
]
Expand Down
2 changes: 1 addition & 1 deletion Directory.Build.props
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<Project>
<PropertyGroup>
<Urho3DNetVersion>0.3.7.832</Urho3DNetVersion>
<Urho3DNetVersion>0.3.7.837</Urho3DNetVersion>
</PropertyGroup>
</Project>
7 changes: 3 additions & 4 deletions RbfxTemplate/GameState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -219,9 +219,9 @@ public Tile CreateTile(string imageName)
m.SetTexture("Albedo", tex);

var tile = _scene.Ptr.InstantiatePrefab(_tilePrefab);
var model = tile.GetComponent<StaticModel>(true);
var model = tile.FindComponent<StaticModel>(ComponentSearchFlag.Default);
model.SetMaterial(m);
return tile.GetComponent<Tile>(true);
return tile.FindComponent<Tile>(ComponentSearchFlag.Default);
}

public Ray GetScreenRay(IntVector2 inputMousePosition)
Expand All @@ -235,8 +235,7 @@ public Tile PickTile(IntVector2 inputMousePosition)
var physics = _scene.Ptr.GetComponent<PhysicsWorld>();
physics.RaycastSingle(_raycastResult, ray, 100);
if (_raycastResult.Body != null)
return _raycastResult.Body.Node.GetComponent<Tile>() ??
_raycastResult.Body.Node.GetParentComponent<Tile>(true);
return _raycastResult.Body.Node.FindComponent<Tile>(ComponentSearchFlag.SelfOrParentRecursive);
return null;
}

Expand Down
2 changes: 1 addition & 1 deletion RbfxTemplate/GameStates/DragState.cs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ public void TrackTile(Tile tile, InteractionKey interactionKey)
_interactionKey = interactionKey;
tile.LinkTo(null);
var material = Context.ResourceCache.GetResource<Material>("Materials/White.material");
tile.Link.GetComponent<AnimatedModel>(true).SetMaterial(material);
tile.Link.FindComponent<AnimatedModel>(ComponentSearchFlag.Default | ComponentSearchFlag.Disabled).SetMaterial(material);
}

private void MoveLink(IntVector2 intVector2)
Expand Down

0 comments on commit 199ab28

Please sign in to comment.