This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* @Author: Fang Zhang <thuzhf@gmail.com> | |
* @Date: 2016-09-24 16:03:32 | |
*/ | |
#include <iostream> | |
using namespace std; | |
using ull = unsigned long long; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
i = 1; | |
xna.Vector3 fp = mission.TeamsRef[teamId].Fishes[i].PositionMm; // fish position | |
float dir_x = -150f; | |
float dir_z = -dir_x / (float)Math.Sqrt(3); | |
xna.Vector3 dir = new xna.Vector3(dir_x, 0f, dir_z); | |
xna.Vector3 targetPoint = fp + dir; | |
float targetDirection = (float)Math.PI / 6 * 5; | |
StrategyHelper.Helpers.Dribble( | |
ref decisions[i], mission.TeamsRef[teamId].Fishes[i], targetPoint, targetDirection, 5, 10, 150, 14, 10, 15, 100, true | |
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public Decision number_act(int i, int j, xna.Vector3 fishPm, xna.Vector3 ballsPm, RoboFish fish, xna.Vector3 finish_place) | |
{ | |
double xg = finish_place.X; | |
double zg = finish_place.Z;//终点位置 | |
double r = 58.0; | |
double x = fishPm.X; | |
double z = fishPm.Z; //鱼的刚体坐标 | |
double num6 = ballsPm.X; | |
double num7 = ballsPm.Z; //球心坐标 | |
double d = Math.Atan((zg - num7) / (xg - num6));//球心到目标点这条直线和x轴的角度正切值 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//----------------------------------------------------------------------- | |
// Copyright (C), 2010, PKU&HNIU | |
// File Name: Match5V5.cs | |
// Date: 20101119 Author: LiYoubing Version: 1 | |
// Description: 两队对抗赛3VS3相关的仿真机器鱼,仿真环境和仿真使命定义文件 | |
// Histroy: | |
// Date: 20110512 Author: LiYoubing | |
// Modification: | |
// 1.受RoboFish的碰撞状态标志改成标志列表的影响 标志值的比较改用List.Contains方法进行 | |
// Date: 20110516 Author: LiYoubing |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using xna = Microsoft.Xna.Framework; | |
using URWPGSim2D.Common; | |
using URWPGSim2D.StrategyLoader; | |
using URWPGSim2D.Core; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using xna = Microsoft.Xna.Framework; | |
using URWPGSim2D.Common; | |
using URWPGSim2D.StrategyLoader; | |
using URWPGSim2D.Core; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using xna = Microsoft.Xna.Framework; | |
using URWPGSim2D.Common; | |
using URWPGSim2D.StrategyLoader; | |
using URWPGSim2D.Core; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if (state == State.center_area) | |
{ | |
if (ballsPm.X < -500) | |
{ | |
state = (goal == 0 ? State.defense_area : State.attack_area); | |
} | |
else if (ballsPm.X > 500) | |
{ | |
state = (goal == 0 ? State.attack_area : State.defense_area); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using xna = Microsoft.Xna.Framework; | |
using URWPGSim2D.Common; | |
using URWPGSim2D.StrategyLoader; | |
using URWPGSim2D.Core; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
using System; | |
using System.Collections.Generic; | |
using System.Linq; | |
using System.Text; | |
using xna = Microsoft.Xna.Framework; | |
using URWPGSim2D.Common; | |
using URWPGSim2D.StrategyLoader; | |
using URWPGSim2D.Core; |
NewerOlder