public override IEntity CreateMapObj(int id) { var gameObj = _objectManager.Get(id); if (gameObj == null) { return(null); } var door = (MapObjectEntity)MapObjectEntityFactory.CreateDoor(id, gameObj); MapObjectUtility.RecordMapObj(id, (int)_triggerType, door); return(door); }
public override IEntity CreateMapObj(int id) { var gameObj = _objectManager.Get(id); if (gameObj == null) { _logger.ErrorFormat("Can't create mapObj, because gameObj(id={0}) is not loaded", id); return(null); } var door = (MapObjectEntity)MapObjectEntityFactory.CreateDoor(id, gameObj); MapObjectUtility.RecordMapObj(id, (int)_triggerType, door); MapObjectUtility.FetchFractruedState(gameObj); return(door); }
public override void OnTriggerObjectLoaded(string id, GameObject gameObject) { _logger.DebugFormat("Door Loaded {0}", id); MapObjectEntityFactory.CreateDoor(id, gameObject, _detachCallback.OnDetach); }