Exemplo n.º 1
0
        public override bool Initialize(IActorInitBase init)
        {
            base.Initialize(init);

            WayPointInit myInit = init as WayPointInit;

            if (myInit == null || myInit.PatrolNode == null)
            {
                return(false);
            }
            mPatrolNodeData = myInit.PatrolNode;
            var pos = new SlimDX.Vector3(mPatrolNodeData.posX, 0, mPatrolNodeData.posZ);

            mPlacement.SetLocation(ref pos);

            return(true);
        }
Exemplo n.º 2
0
        public static WayPoint CreateWayPoint(MapInfo_PatrolNode data, MapInstance map)
        {
            if (data == null)
            {
                return(null);
            }

            WayPoint ret = new WayPoint();

            ret.mInstId = ServerFrame.Util.GenerateObjID(ServerFrame.GameObjectType.WayPoint);
            var init = new WayPointInit();

            init.GameType   = eActorGameType.Potal;
            init.PatrolNode = data;
            ret.Initialize(init);
            ret.OnEnterMap(map);

            return(ret);
        }