public override void BindEntity(Entity *entityPtr) { if (entityPtr == null) { throw new Exception("BindViewError: EntityPtr should not be null"); } _ptr = (BoidObstacle *)entityPtr; _cloneEntity = *_ptr; _Instance = this; }
private int _GetOffsetOfBoidObstacle_Tag() { var tempObj = new BoidObstacle(); BoidObstacle *ptr = &tempObj; var filedPtr = &(ptr->Tag); return((int)((long)filedPtr - (long)ptr)); }
public override void DoUpdate(float deltaTime) { _cloneEntity = *_ptr; UpdatePosRot(ref _cloneEntity.Transform); }