Begin script abstraction
This commit is contained in:
23
ReallifeGamemode.Server.Core.RageMP/RageColShape.cs
Normal file
23
ReallifeGamemode.Server.Core.RageMP/RageColShape.cs
Normal file
@@ -0,0 +1,23 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using ReallifeGamemode.Server.Core.API;
|
||||
|
||||
namespace ReallifeGamemode.Server.Core.RageMP
|
||||
{
|
||||
public class RageColShape : RageEntity, IColShape
|
||||
{
|
||||
private GTANetworkAPI.ColShape colShape;
|
||||
|
||||
public RageColShape(GTANetworkAPI.ColShape colShape) : base(colShape)
|
||||
{
|
||||
this.colShape = colShape;
|
||||
|
||||
this.colShape.OnEntityEnterColShape += (c, p) => OnEntityEnter?.Invoke(this, new RagePlayer(p));
|
||||
this.colShape.OnEntityExitColShape += (c, p) => OnEntityExit?.Invoke(this, new RagePlayer(p));
|
||||
}
|
||||
|
||||
public event IColShape.ColShapeEvent OnEntityEnter;
|
||||
public event IColShape.ColShapeEvent OnEntityExit;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user