mines are invisible to others
This commit is contained in:
18
OpenRa.Game/Traits/InvisibleToOthers.cs
Normal file
18
OpenRa.Game/Traits/InvisibleToOthers.cs
Normal file
@@ -0,0 +1,18 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Text;
|
||||
|
||||
namespace OpenRa.Game.Traits
|
||||
{
|
||||
class InvisibleToOthers : IRenderModifier
|
||||
{
|
||||
public InvisibleToOthers(Actor self) { }
|
||||
|
||||
public IEnumerable<Renderable> ModifyRender(Actor self, IEnumerable<Renderable> r)
|
||||
{
|
||||
return Game.LocalPlayer == self.Owner
|
||||
? r : new Renderable[] { };
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user