Beispiel #1
0
 /// 移動目標対象をコンテナへ登録
 public bool SetDestinationActor(GameActorCollObjContainer container)
 {
     for (int i = 0; i < actorChList.Count; i++)
     {
         if (actorChList[i].deadFlag == true || actorChList[i].FrameFlag == false || actorChList[i].ActiveFlg == false)
         {
             return(true);
         }
         for (int j = 0; j < actorChList[i].GetUseObjNum(); j++)
         {
             if (ctrlResMgr.CtrlStg.FirstTouch() == true)
             {
                 container.Add(actorChList[i], actorChList[i].GetUseObj(j));
             }
             else
             {
                 float dis = Common.VectorUtil.DistanceXZ(activeList[i].GetBodyPos(), ctrlResMgr.CtrlStg.TouchPosition());
                 if (dis < (float)Data.SetupValue.TouchNextActiveArea)
                 {
                     container.Add(actorChList[i], actorChList[i].GetUseObj(j));
                 }
             }
         }
     }
     return(true);
 }
Beispiel #2
0
        /// 衝突対象をコンテナへ登録
        public bool SetCollisionActor(GameActorCollObjContainer container, Vector3 trgPos)
        {
            int gridW = (int)((300.0f + trgPos.X) / gridWidth);
            int gridH = (int)((300.0f + trgPos.Z) / gridWidth);

            if (gridW < 0 || gridW >= gridNum || gridH < 0 || gridH >= gridNum)
            {
                return(false);
            }

            int grid = (gridW + gridH * gridNum);

            for (int i = 0; i < gridActorIdxList[grid].Count; i++)
            {
                int idx = gridActorIdxList[grid][i];

                /// 破棄された備品はスルーする
                ///-------------------------------------
                if (!actorFixList[idx].Enable)
                {
                    continue;
                }

                container.Add(actorFixList[idx], actorFixList[idx].GetUseObj(0));
            }

            return(true);
        }
Beispiel #3
0
        /// 目的地対象をコンテナへ登録
        public void SetDestinationActor(GameActorCollObjContainer container)
        {
            int actorIdx;

            for (int i = 0; i < fixFragileIdxList.Count; i++)
            {
                actorIdx = fixFragileIdxList[i];

                /// 破棄された備品はスルーする
                ///-------------------------------------
                if (!actorFixList[actorIdx].Enable)
                {
                    continue;
                }

                /// 非表示の備品はスルーする
                ///-------------------------------------
                else if (!actorFixList[actorIdx].Enable)
                {
                    continue;
                }

                container.Add(actorFixList[actorIdx], actorFixList[actorIdx].GetUseObj(0));
            }
        }
 /// 破棄
 public void Term()
 {
     if( TrgContainer != null ){
     TrgContainer.Term();
     }
     MoveShape       = null;
     TrgContainer    = null;
 }
Beispiel #5
0
 /// 衝突対象をコンテナへ登録
 public bool SetCollisionActor(GameActorCollObjContainer container, Vector3 trgPos)
 {
     for (int i = 0; i < actorStg.GetUseObjNum(); i++)
     {
         container.Add(actorStg, actorStg.GetUseObj(i));
     }
     return(true);
 }
Beispiel #6
0
        /// 衝突対象をコンテナにセット
        public void SetCollisionActor(GameActorCollObjContainer container, Vector3 trgPos)
        {
            container.Clear();

            ctrlStg.SetCollisionActor(container, trgPos);
            ctrlHobit.SetCollisionActor(container, trgPos);
            ctrlTo.SetCollisionActor(container, trgPos);
            ctrlWall.SetCollisionActor(container, trgPos);
            ctrlMo.SetCollisionActor(container, trgPos);
            ctrlHouse.SetCollisionActor(container, trgPos);
        }
Beispiel #7
0
        /// 衝突対象をコンテナへ登録
        public bool SetCollisionActor(GameActorCollObjContainer container, Vector3 trgPos)
        {
            for (int i = 0; i < actorChList.Count; i++)
            {
                for (int j = 0; j < actorChList[i].GetUseObjNum(); j++)
                {
                    if (actorChList[i].deadFlag == true || actorChList[i].FrameFlag == false || actorChList[i].ActiveFlg == false)
                    {
                        return(true);
                    }
                    if (actorChList[i].ActiveDis < (int)Data.SetupValue.TitanSize + (int)Data.SetupValue.AddContainorArea)
                    {
                        container.Add(actorChList[i], actorChList[i].GetUseObj(j));
                    }
                }
            }

            return(true);
        }
        /// 衝突対象をコンテナにセット
        public void SetCollisionActor( GameActorCollObjContainer container, Vector3 trgPos )
        {
            container.Clear();

            ctrlStg.SetCollisionActor( container, trgPos );
            ctrlHobit.SetCollisionActor( container, trgPos );
            ctrlTo.SetCollisionActor( container, trgPos );
            ctrlWall.SetCollisionActor( container, trgPos );
            ctrlMo.SetCollisionActor( container, trgPos );
            ctrlHouse.SetCollisionActor( container, trgPos );
        }
Beispiel #9
0
 /// 移動目標対象をコンテナへ登録
 public bool SetDestinationActor( GameActorCollObjContainer container )
 {
     for( int i=0; i<actorChList.Count; i++ ){
     if(actorChList[i].deadFlag == true || actorChList[i].ActiveFlg == false){
         return true;
     }
     for( int j=0; j<actorChList[i].GetUseObjNum(); j++ ){
         if(ctrlResMgr.CtrlStg.FirstTouch() == true){
             container.Add( actorChList[i], actorChList[i].GetUseObj(j) );
         }else{
             float dis = Common.VectorUtil.DistanceXZ(activeList[i].GetBodyPos(), ctrlResMgr.CtrlStg.TouchPosition());
             if( dis < (float)Data.SetupValue.TouchNextActiveArea){
                 container.Add( actorChList[i], actorChList[i].GetUseObj(j) );
             }
         }
     }
     }
     return true;
 }
Beispiel #10
0
        /// 衝突対象をコンテナへ登録
        public bool SetCollisionActor( GameActorCollObjContainer container, Vector3 trgPos )
        {
            for( int i=0; i<actorChList.Count; i++ ){
            for( int j=0; j<actorChList[i].GetUseObjNum(); j++ ){
                if(actorChList[i].deadFlag == true  || actorChList[i].ActiveFlg == false){
                    return true;
                }
                if(actorChList[i].ActiveDis < (int)Data.SetupValue.TitanSize+(int)Data.SetupValue.AddContainorArea){
                    container.Add( actorChList[i], actorChList[i].GetUseObj(j) );
                }
            }
            }

            return true;
        }
Beispiel #11
0
/// public メソッド
///---------------------------------------------------------------------------

        /// 初期化
        public void Init()
        {
            TrgContainer = new GameActorCollObjContainer();
            TrgContainer.Init();
        }
Beispiel #12
0
        /// 目的地対象をコンテナへ登録
        public void SetDestinationActor( GameActorCollObjContainer container )
        {
            int actorIdx;
            for( int i=0; i<fixFragileIdxList.Count; i++ ){

            actorIdx = fixFragileIdxList[i];

            /// 破棄された備品はスルーする
            ///-------------------------------------
            if( !actorFixList[actorIdx].Enable ){
                continue ;
            }

            /// 非表示の備品はスルーする
            ///-------------------------------------
            else if( !actorFixList[actorIdx].Enable ){
                continue ;
            }

            container.Add( actorFixList[actorIdx], actorFixList[actorIdx].GetUseObj(0) );
            }
        }
Beispiel #13
0
        /// 衝突対象をコンテナへ登録
        public bool SetCollisionActor( GameActorCollObjContainer container, Vector3 trgPos )
        {
            int gridW = (int)( (300.0f+trgPos.X)/gridWidth );
            int gridH = (int)( (300.0f+trgPos.Z)/gridWidth );

            if( gridW < 0 || gridW >= gridNum || gridH < 0 || gridH >= gridNum ){
            return false;
            }

            int grid = ( gridW + gridH*gridNum );
            for( int i=0; i<gridActorIdxList[grid].Count; i++ ){
            int idx = gridActorIdxList[grid][i];

            /// 破棄された備品はスルーする
            ///-------------------------------------
            if( !actorFixList[idx].Enable ){
                continue ;
            }

            container.Add( actorFixList[idx], actorFixList[idx].GetUseObj(0) );
            }

            return true;
        }
Beispiel #14
0
 /// 衝突対象をコンテナにセット
 public void SetCollisionActorEn(GameActorCollObjContainer container, Vector3 trgPos)
 {
     container.Clear();
     ctrlStg.SetCollisionActor(container, trgPos);
 }
 /// 衝突対象をコンテナにセット
 public void SetCollisionActorEn( GameActorCollObjContainer container, Vector3 trgPos )
 {
     container.Clear();
     ctrlStg.SetCollisionActor( container, trgPos );
 }
Beispiel #16
0
 /// 衝突対象をコンテナへ登録
 public bool SetCollisionActor( GameActorCollObjContainer container, Vector3 trgPos )
 {
     for( int i=0; i<actorStg.GetUseObjNum(); i++ ){
     container.Add( actorStg, actorStg.GetUseObj(i) );
     }
     return true;
 }
 /// public メソッド
 ///---------------------------------------------------------------------------
 /// 初期化
 public void Init()
 {
     TrgContainer    = new GameActorCollObjContainer();
     TrgContainer.Init();
 }