// Places

        public void OnPlaceHitEvt(object sender, PlaceHitArgs args)
        {
            // This intentionally accesses linked data to show issues
            // IBike bike = args.ib;
            // string bikeOwner = bike.peerId;

            // BeamPlace place = args.p;
            // IBike createdBy = place.bike;  // TODO: CRASH happens here. When no longer useful make it bulletproof
            //                                // (would rather make it not happen - not sure if that's possible)
            // string placeOwner = createdBy.peerId;

            logger.Info($"OnPlaceHitEvt. Place: {args.p?.GetPos().ToString()}  Bike: {SID(args.ib?.bikeId)}");
        }
示例#2
0
 public void OnPlaceHitEvt(object sender, PlaceHitArgs args)
 {
     GetBikeObj(args.ib.bikeId)?.GetComponent <FrontendBike>()?.OnPlaceHit(args.p);
 }