Exemple #1
0
        public bool ReInitTriggerInstance(MapInfo_Portal td, MapInstance map)
        {
            mTriggerData = td;
            this.OnEnterMap(map);
            var pos = new SlimDX.Vector3(td.posX, 0, td.posZ);

            mPlacement.SetLocation(ref pos);
            return(true);
        }
Exemple #2
0
        public override bool Initialize(IActorInitBase init)
        {
            base.Initialize(init);

            TriggerInit myInit = init as TriggerInit;

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

            mPlacement.SetLocation(ref pos);
            //mScript = new PortalScript();

            return(true);
        }
Exemple #3
0
        public static TriggerInstance CreateTriggerInstance(MapInfo_Portal td, MapInstance map)
        {
            if (td == null)
            {
                return(null);
            }

            TriggerInstance ret = new TriggerInstance();

            //ret.mInstId = ServerFrame.Util.GenerateObjID(ServerFrame.GameObjectType.Trigger);
            var init = new TriggerInit();

            init.GameType   = eActorGameType.Potal;
            init.PortalDate = td;
            ret.Initialize(init);
            ret.OnEnterMap(map);

            return(ret);
        }