/// フレーム処理:移動 private void frameMove2d() { if (useCollMgr != null) { calCollMove.SetMoveType(Data.CollTypeId.littleMove); useCollMgr.MoveShape.SetMult(baseMtx); Vector3 movePos = StaticDataList.getVectorZero(); calCollMove.GetMovePos(useCollMgr, calCollGrav.TreadVec, (moveVec * movePow), ref movePos); basePos = movePos; for (int checkCnt = 0; checkCnt < 4; checkCnt++) { if (calCollMove.Check(useCollMgr, movePos) == true) { movePos = calCollMove.NextPos; } else { basePos = calCollMove.NextPos; break; } } } else { basePos = (moveVec * movePow) + basePos; } Common.MatrixUtil.SetTranslate(ref baseMtx, basePos); playId &= ~PlayId.Move2d; isUpdateMtx = true; }
/// private メソッド ///--------------------------------------------------------------------------- /// フレーム:移動 private bool frameMove(ActorChHobit actorCh) { actorCh.AiMoveCount--; if (actorCh.AiMoveCount < 0) { actorCh.MovedFlag = true; if (actorCh.texId < (int)Data.Tex2dResId.NormalCharMax) { int ToNumber = ctrlResMgr.CtrlTo.GetEntryNum() + ctrlResMgr.CtrlWall.GetEntryNum(); if (ToNumber == 0) { actorCh.AiMoveRot = (int)StaticDataList.getRandom(0, 360); } else { int towerNumber = (int)StaticDataList.getRandom(0, ToNumber); glowTowerWall(actorCh, towerNumber); moveToTowerWall(actorCh, towerNumber); } } if (actorCh.texId == (int)Data.Tex2dResId.Zonbi1) { actorCh.AiMoveRot += Common.VectorUtil.GetRotY(actorCh.AiMoveRot, actorCh.BasePos, ctrlResMgr.EnemyMoPos) + StaticDataList.getRandom(-10, 10); } actorCh.AiMoveCount = (int)(Data.SetupValue.CharMoveChangeTime + StaticDataList.getRandom(-(int)(Data.SetupValue.CharMoveChangeRandTime), (int)Data.SetupValue.CharMoveChangeRandTime)); actorSpeek(actorCh); } moveCh(actorCh); return(true); }
/// 初期化 public override bool DoInit() { shapeMove = null; shapeMove = new ShapeSphere(); shapeMove.Init(1); shapeMove.Set(0, StaticDataList.getVectorZero(), 0.3f); shapeColl = new ShapeCapsule(); shapeColl.Init(1); shapeColl.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TitanSize); shapeCollforDis = new ShapeCapsule(); shapeCollforDis.Init(1); shapeCollforDis.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TouchSize); scale = (int)Data.SetupValue.CharScale / 100.0f; moveAngle = false; preDeadFlag = false; // useMdlHdl = new Common.ModelHandle(); // useMdlHdl.Init(); return(true); }
/// シーンの初期化 public bool Init(DemoGame.SceneManager sceneMgr) { useSceneMgr = sceneMgr; calCollGrav = new ActorUnitCollGravity(); calCollGrav.Init(); moveCollMgr = new GameActorCollManager(); moveCollMgr.Init(); shapeMove = new ShapeSphere(); shapeMove.Init(1); shapeMove.Set(0, StaticDataList.getVectorZero(), 0.001f); renderSph = new DemoGame.RenderGeometry(); renderSph.MakeSphere(); /// trgObj = null; /// 移動する自身のOBJを登録 moveCollMgr.SetMoveShape(shapeMove); trgObjMoveSpd = 1.0f; setPlaceTypeParam(trgObjType); nowTaskId = debugMenuTaskId.SelectObj; changeTask(debugMenuTaskId.SelectObj); return(true); }
public void FrameGravity2d(ref bool flag) { if (useCollMgr != null) { do { useCollMgr.MoveShape.SetMult(baseMtx); Vector3 movePos = StaticDataList.getVectorZero(); calCollGrav.GetMovePos(useCollMgr, ref movePos); if (calCollGrav.Check(useCollMgr, movePos) == true) { basePos = calCollGrav.NextPos; break; /// OBJに接地 } if (calCollGrav.TouchPos0() == true) { basePos = calCollGrav.NextPos; break; } basePos = calCollGrav.NextPos; Common.MatrixUtil.SetTranslate(ref baseMtx, basePos); }while(flag == true); flag = false; } Common.MatrixUtil.SetTranslate(ref baseMtx, basePos); playId &= ~PlayId.Move2d; isUpdateMtx = true; }
/// カプセルとカプセルとの衝突 public bool Check(DemoGame.GeometryCapsule moveCap, ShapeCapsule trgCap) { /// 同じ座標にいる場合はすり抜ける if (moveCap.StartPos == trgCap.Capsule.StartPos) { // return false; } /// 対象と反対向きへ移動する際にはすり抜ける float rot = Common.VectorUtil.GetPointRotY(moveCap.Line.Vec, moveCap.StartPos, trgCap.Capsule.StartPos); if (rot <= -50.0f || rot >= 50.0f) { // return false; } Vector3 collPos = StaticDataList.getVectorZero(); calMovePos = moveCap.EndPos; if (DemoGame.CommonCollision.CheckCapsuleAndCapsule(moveCap, trgCap.Capsule, ref collPos) == true) { calMovePos = collPos; return(true); } return(false); }
/// public メソッド ///--------------------------------------------------------------------------- /// 初期化 public bool Init() { actorStg = new ActorStgNormal(); actorStg.Init(); actorDestination = new ActorDestinationMark(); actorDestination.Init(); calCollLook = new ActorUnitCollLook(); calCollLook.Init(); EventCntr = new GameActorEventContainer(); EventCntr.Init(); towerPos.Xyz = StaticDataList.getVectorZero(); effectPos.Xyz = StaticDataList.getVectorZero(); mode = 0; TouchCount = 0; MonumentSetFlag = false; makeEnemyMonument = 0; TowerAreaNorth = -114.4f; TowerAreaSouth = -120.4f; TowerAreaEast = 109.0f; TowerAreaWest = 103.0f; return(true); }
/// 初期化 public override bool DoInit() { shapeMove = null; shapeMove = new ShapeSphere(); shapeMove.Init(1); shapeMove.Set(0, StaticDataList.getVectorZero(), 0.4f); shapeColl = new ShapeCapsule(); shapeColl.Init(1); shapeColl.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TitanSize); shapeCollforDis = new ShapeCapsule(); shapeCollforDis.Init(1); shapeCollforDis.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TouchSize); appearCount = 30; glowCounter = 0; scale = (int)Data.SetupValue.WallScale / 100.0f; farFlag = false; distance = Common.VectorUtil.DistanceXZ(pos1, pos2); angle = FMath.Atan((pos1.X - pos2.X) / (pos1.Z - pos2.Z)) + FMath.PI / 2; return(true); }
public Hp2dTex(int Id, float posX, float posY, float speed) { this.Id = Id; Data.ModelDataManager resMgr = Data.ModelDataManager.GetInstance(); if (Id == (int)Data.Tex2dResId.TowerStart) { textureInfo = resMgr.SetTexture2((int)Data.Tex2dResId.Bosstower); } else if (Id == (int)Data.Tex2dResId.HouseStart) { textureInfo = resMgr.SetTexture2((int)Data.Tex2dResId.BossMonument); } else if (Id == (int)Data.Tex2dResId.WallStart) { textureInfo = resMgr.SetTexture2((int)Data.Tex2dResId.BossWall); } else { textureInfo = resMgr.SetTexture2((int)Id); } uvPos = new Vector2(textureInfo.u0, textureInfo.v0); uvSize = new Vector2(textureInfo.u1 - textureInfo.u0, textureInfo.v1 - textureInfo.v0); texSize = new Vector2(textureInfo.w, textureInfo.h) * 1.5f; //randomにする rotate = StaticDataList.getRandom(0, 360); rotatespeed = StaticDataList.getRandom(3, 6) / 100.0f; Pos.X = posX; Pos.Y = posY; this.speed = speed; deadFlag = false; }
private void actorSpeek(ActorChHobit actorCh) { actorCh.AiMoveCount = (int)(Data.SetupValue.CharMoveChangeTime + StaticDataList.getRandom(-(int)(Data.SetupValue.CharMoveChangeRandTime), (int)Data.SetupValue.CharMoveChangeRandTime)); if (actorCh.texId != (int)Data.Tex2dResId.Zonbi1 && actorCh.texId != (int)Data.Tex2dResId.Necromancer1) { if (StaticDataList.getRandom(0, 100) < (int)Data.SetupValue.BaloonAppearRand && actorCh.deadFlagSp == true && speakCount < 6) { actorCh.setAppearCountSp((int)Data.SetupValue.AppearAndLeaveTime); speakCount++; int charVoNumber = StaticDataList.getRandom(3); switch (charVoNumber) { case 0: AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.CharVo1, actorCh.GetBodyPos()); break; case 1: AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.CharVo2, actorCh.GetBodyPos()); break; case 2: AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.CharVo3, actorCh.GetBodyPos()); break; } } } else if (actorCh.texId == (int)Data.Tex2dResId.Zonbi1) { if (StaticDataList.getRandom(0, 100) < (int)Data.SetupValue.GionAppearRand && actorCh.deadFlagSp == true && speakCount < 6) { actorCh.setAppearCountSp((int)Data.SetupValue.GionAppearSpeed); speakCount++; AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.ZonbiVo3, actorCh.GetBodyPos()); } } }
/// アクタの所属マップ生成 private void updateGridEntryList() { Vector3 pos = StaticDataList.getVectorZero(); for (int i = 0; i < gridMax; i++) { gridActorIdxList[i].Clear(); } for (int x = 0; x < gridNum; x++) { pos.X = -300.0f + 2.5f + x * 5.0f; for (int y = 0; y < gridNum; y++) { pos.Z = -300.0f + 2.5f + y * 5.0f; for (int i = 0; i < actorFixList.Count; i++) { ShapeSphere bndSph = actorFixList[i].GetBoundingShape(); if (Common.VectorUtil.DistanceXZ(pos, GetPos(i)) < gridAreaDis + bndSph.Sphre.R) { gridActorIdxList[x + y * gridNum].Add(i); } } } } }
/// 敵の配置 public void SetPlace(int idx, Vector3 pos) { Matrix4 mtx = Matrix4.RotationY(StaticDataList.getRandom(0, 360)); Common.MatrixUtil.SetTranslate(ref mtx, pos); actorChList[idx].SetPlace(mtx); }
private void battleEffect(ActorChHobit actorCh) { if (StaticDataList.getRandom(0, (int)Data.SetupValue.BattleEffectRand + 1) == 0) { AppSound.GetInstance().PlaySeCamDis(AppSound.SeId.PlDamage, actorCh.GetBodyPos()); //ctrlResMgr.CtrlPl.Addeffect(new Vector3( actorCh.BasePos.X + StaticDataList.getRandom(-15,15)/5.0f ,actorCh.BasePos.Y + 0.2f ,actorCh.BasePos.Z+ StaticDataList.getRandom(-15,15)/5.0f)); ctrlResMgr.AddEffectFromEnemy = true; ctrlResMgr.AddEnemyEffectPos = actorCh.BasePos; } }
/// 開始 public override bool DoStart() { tweetNumber = StaticDataList.getRandom(0, 9); currentFont = new Font(FontAlias.System, 20, FontStyle.Regular); sprite = new Sprite(tweet.tweetlist[TexId, tweetNumber], 0xffffffff, currentFont, 0, 0); textureShaderProgram = createSimpleTextureShader(); scaleX = tweet.tweetlist[TexId, tweetNumber].Length / 9.0f; return(true); }
private void AddHouseFromMonument() { int disNS = (int)(CtrlStg.TowerAreaNorth - CtrlStg.TowerAreaSouth); int disEW = (int)(CtrlStg.TowerAreaEast - CtrlStg.TowerAreaWest); CtrlHouse.EntryAddHouse((int)(StaticDataList.getRandom((int)Data.Tex2dResId.HouseStart + 2, (int)Data.Tex2dResId.HouseMax)), new Vector3(StaticDataList.getRandom((int)CtrlStg.TowerAreaSouth - disNS / 2, (int)CtrlStg.TowerAreaNorth + disNS / 2), 50.0f, StaticDataList.getRandom((int)CtrlStg.TowerAreaWest - disEW / 2, (int)CtrlStg.TowerAreaEast + disEW / 2)) ); }
/// public メソッド ///--------------------------------------------------------------------------- /* * /// ボーンの姿勢を取得 * public Matrix4 GetBoneMatrix( int boneId ) * { * // return useMdlHdl.GetBoneMatrix( boneId ); * } */ /// モデルのセット public void SetMdlHandle(Data.ChTypeId chTypeId) { shapeColl.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 20.0f); shapeCollforDis.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 1.0f); /* switch( chTypeId ){ * case Data.ChTypeId.MonumentA: shapeColl.Set( 0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 1.0f ); break; * case Data.ChTypeId.MonumentB: shapeColl.Set( 0, StaticDataList.getVectorZero(), new Vector3(0.0f, 0.75f, 0.0f), 0.5f ); break; * case Data.ChTypeId.MonumentC: shapeColl.Set( 0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 1.0f ); break; * } */ }
/// 継承メソッド ///--------------------------------------------------------------------------- /// 初期化 public override bool DoInit() { shapeMove = null; shapeMove = new ShapeSphere(); shapeMove.Init(1); shapeMove.Set(0, StaticDataList.getVectorZero(), objWidth); // titanModel = new BasicModel("/Application/res/data/3D/char/titan.mdx", 0); program = new BasicProgram(); return(true); }
private void AddEnemyFromMonument() { // int makeEnemy = 4+(int)Data.SetupValue.BonusNewMoNewEnemy*(ctrlMo.GetEntryNum()-1); // int tempRandNumber = StaticDataList.getRandom(0,makeEnemy); int tempRandNumber = 1; for (int i = 0; i < tempRandNumber; i++) { int moNumber = StaticDataList.getRandom(0, ctrlMo.GetEntryNum()); ctrlHobit.EntryAddEnemy(StaticDataList.getRandom((int)Data.Tex2dResId.CharStart + 1, (int)Data.Tex2dResId.NormalCharMax), new Vector3(ctrlMo.GetPos(0).X, 34.0f, ctrlMo.GetPos(0).Z)); } }
/// public メソッド ///--------------------------------------------------------------------------- /* * /// ボーンの姿勢を取得 * public Matrix4 GetBoneMatrix( int boneId ) * { * // return useMdlHdl.GetBoneMatrix( boneId ); * } */ /// モデルのセット public void SetMdlHandle(Data.ChTypeId chTypeId) { // shapeColl.Set( 0, StaticDataList.getVectorZero(), 0.001f ); shapeColl.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 20.0f); /* switch( chTypeId ){ * case Data.ChTypeId.WallA: shapeColl.Set( 0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 1.0f ); break; * case Data.ChTypeId.WallB: shapeColl.Set( 0, StaticDataList.getVectorZero(), new Vector3(0.0f, 0.75f, 0.0f), 0.5f ); break; * case Data.ChTypeId.WallC: shapeColl.Set( 0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 1.0f ); break; * } */ }
private void randomMoveToTowerWall(ActorChHobit actorCh) { int ToNumber = ctrlResMgr.CtrlTo.GetEntryNum() + ctrlResMgr.CtrlWall.GetEntryNum(); if (ToNumber == 0) { actorCh.AiMoveRot = (int)StaticDataList.getRandom(0, 360); } else { int towerNumber = (int)StaticDataList.getRandom(0, ToNumber); moveToTowerWall(actorCh, towerNumber); } }
private void moveToTowerWall(ActorChHobit actorCh, int towerNumber) { float tempRot; if (towerNumber < ctrlResMgr.CtrlTo.GetEntryNum()) { tempRot = Common.VectorUtil.GetRotY(actorCh.AiMoveRot, actorCh.BasePos, ctrlResMgr.CtrlTo.GetPos(towerNumber)); } else { tempRot = Common.VectorUtil.GetRotY(actorCh.AiMoveRot, actorCh.BasePos, ctrlResMgr.CtrlWall.GetPos(towerNumber - ctrlResMgr.CtrlTo.GetEntryNum())); } actorCh.AiMoveRot += tempRot + StaticDataList.getRandom(-3, 3); }
/// 開始 protected override bool DoStart() { objCh.Start(); if (objCh.texId != (int)Data.Tex2dResId.Necromancer1) { objSpeech.Start(); } ActiveFlg = false; ActiveCnt = 0; ActiveDis = 0; AiAttackCnt = 0; AiMoveCount = (int)(Data.SetupValue.CharMoveChangeTime + (int)StaticDataList.getRandom(-10, 10)); return(true); }
/// 衝突後の移動座標をセット(三角形との衝突) private void setScrapedMovePosTriangle(GameActorCollManager collMgr, Vector3 movePos, ShapeTriangles shapeTri) { ShapeSphere moveSph = (ShapeSphere)collMgr.MoveShape; int primId = collMgr.TrgContainer.GetEntryPrimId(0); Vector3 collPos = StaticDataList.getVectorZero(); float scrapedPow = (moveSph.Sphre.R + 0.001f); /// 点と面上の最近接点を求める DemoGame.CommonCollision.GetClosestPtPosPlane(movePos, shapeTri.Triangle[primId].Plane, ref collPos); /// 移動候補座標更新 nextPos.X = collPos.X + (scrapedPow * (shapeTri.Triangle[primId].Plane.Nor.X)); nextPos.Y = collPos.Y + (scrapedPow * (shapeTri.Triangle[primId].Plane.Nor.Y)); nextPos.Z = collPos.Z + (scrapedPow * (shapeTri.Triangle[primId].Plane.Nor.Z)); }
public void ClearMakeWall() { towerPos.Xyz = StaticDataList.getVectorZero(); effectPos.Xyz = StaticDataList.getVectorZero(); if (mode == 1) { // ctrlResMgr.CtrlHobit.SetCtrlStateId(CtrlHobitemy.CtrlStateId.Eat); // ctrlResMgr.CtrlCam.SetCamMode( CtrlCamera.ModeId.LookMyself ); } mode = 0; TouchCount = 0; makeTowerFlag = true; destinationFlg = false; actorDestination.Enable = false; destinationTrgActor = null; }
private bool frameMurder(ActorChHobit actorCh) { actorCh.AiMoveCount--; if (actorCh.AiMoveCount < 0) { actorCh.MovedFlag = true; if (actorCh.texId == (int)Data.Tex2dResId.Noumin1) { actorCh.AiMoveRot += Common.VectorUtil.GetRotY(actorCh.AiMoveRot, actorCh.BasePos, meanChPos(true, true, false, true)) + StaticDataList.getRandom(-20, 20); if (StaticDataList.random100() < (int)Data.SetupValue.BattleNouminDeadRand) { actorCh.changeId((int)Data.Tex2dResId.Zonbi1); } } if (actorCh.texId == (int)Data.Tex2dResId.Senshi1) { actorCh.AiMoveRot += Common.VectorUtil.GetRotY(actorCh.AiMoveRot, actorCh.BasePos, meanChPos(true, true, false, true)) + StaticDataList.getRandom(-20, 20); if (StaticDataList.random100() < (int)Data.SetupValue.BattleSenshiDeadRand) { actorCh.changeId((int)Data.Tex2dResId.Zonbi1); } } if (actorCh.texId == (int)Data.Tex2dResId.Souryo1) { randomMoveToTowerWall(actorCh); if (StaticDataList.random100() < (int)Data.SetupValue.BattleSouryoDeadRand * 2 * rateCh(false, false, false, true)) { actorCh.changeId((int)Data.Tex2dResId.Zonbi1); } } if (actorCh.texId == (int)Data.Tex2dResId.Zonbi1) { actorCh.AiMoveRot += Common.VectorUtil.GetRotY(actorCh.AiMoveRot, actorCh.BasePos, meanChPos(true, true, false, true)) + StaticDataList.getRandom(-20, 20); if (StaticDataList.random100() < (int)Data.SetupValue.BattleZonbi2DeadRand * 2 * rateCh(false, false, true, false)) { actorCh.setdeadFlag(true); } } battleEffect(actorCh); actorSpeek(actorCh); } moveCh(actorCh); return(true); }
private bool frameEat(ActorChHobit actorCh) { GameCtrlManager ctrlResMgr = GameCtrlManager.GetInstance(); if (actorCh.GetStateId() != ActorChBase.StateId.Eat) { actorCh.AiMoveCount--; if (actorCh.AiMoveCount < 0) { actorCh.AiMoveRot = (int)StaticDataList.getRandom(360); actorCh.AiMoveCount = (int)(Data.SetupValue.CharMoveChangeTime + StaticDataList.getRandom(-(int)(Data.SetupValue.CharMoveChangeRandTime), (int)Data.SetupValue.CharMoveChangeRandTime)); } actorCh.SetStateMove(new Vector3(actorCh.BaseMtx.M31, actorCh.BaseMtx.M32, actorCh.BaseMtx.M33), moveSpeed, actorCh.AiMoveRot, false); } return(true); }
/// 継承メソッド ///--------------------------------------------------------------------------- /// 初期化 public override bool DoInit() { shapeMove = null; shapeMove = new ShapeSphere(); shapeMove.Init(1); shapeMove.Set(0, StaticDataList.getVectorZero(), 0.4f); shapeColl = new ShapeCapsule(); shapeColl.Init(1); shapeColl.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TitanSize); shapeCollforDis = new ShapeCapsule(); shapeCollforDis.Init(1); shapeCollforDis.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TouchSize); return(true); }
/// public メソッド ///--------------------------------------------------------------------------- /* * /// ボーンの姿勢を取得 * public Matrix4 GetBoneMatrix( int boneId ) * { * // return useMdlHdl.GetBoneMatrix( boneId ); * } */ /// モデルのセット public void SetMdlHandle(Data.ChTypeId chTypeId) { int chTypeIdx = (int)chTypeId; int mdlResIdx = (int)Data.ModelResId.Hero + chTypeIdx; int texResIdx = (int)Data.ModelTexResId.Hero + chTypeIdx; // Data.ModelDataManager resMgr = Data.ModelDataManager.GetInstance();// // useMdlHdl.Start( resMgr.GetModel( mdlResIdx ), resMgr.GetTextureContainer( texResIdx ), resMgr.GetShaderContainer( shaResIdx ) ); // shapeColl.Set( 0, StaticDataList.getVectorZero(), 0.001f ); shapeColl.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 20.0f); /* switch( chTypeId ){ * case Data.ChTypeId.WallA: shapeColl.Set( 0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 1.0f ); break; * case Data.ChTypeId.WallB: shapeColl.Set( 0, StaticDataList.getVectorZero(), new Vector3(0.0f, 0.75f, 0.0f), 0.5f ); break; * case Data.ChTypeId.WallC: shapeColl.Set( 0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), 1.0f ); break; * } */ }
/// 初期化 public override bool DoInit() { shapeMove = null; shapeMove = new ShapeSphere(); shapeMove.Init(1); shapeMove.Set(0, StaticDataList.getVectorZero(), 0.4f); shapeColl = new ShapeCapsule(); shapeColl.Init(1); shapeColl.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TitanSize); shapeCollforDis = new ShapeCapsule(); shapeCollforDis.Init(1); shapeCollforDis.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TouchSize); farFlag = false; countForHouse = (int)Data.SetupValue.NewHouseAppearTime; return(true); }
/// 初期化 public override bool DoInit() { shapeMove = null; shapeMove = new ShapeSphere(); shapeMove.Init(1); shapeMove.Set(0, StaticDataList.getVectorZero(), 0.4f); shapeColl = new ShapeCapsule(); shapeColl.Init(1); shapeColl.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TitanSize); shapeCollforDis = new ShapeCapsule(); shapeCollforDis.Init(1); shapeCollforDis.Set(0, StaticDataList.getVectorZero(), new Vector3(0.0f, 2.0f, 0.0f), (float)Data.SetupValue.TouchSize); glowCounter = 0; scale = (int)Data.SetupValue.TowerScale / 100.0f; farFlag = false; return(true); }