本文整理汇总了C#中Calculator.getMap方法的典型用法代码示例。如果您正苦于以下问题:C# Calculator.getMap方法的具体用法?C# Calculator.getMap怎么用?C# Calculator.getMap使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Calculator
的用法示例。
在下文中一共展示了Calculator.getMap方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Start
public void Start()
{
calculator = GetComponent<Calculator>();
Bot bot = new Bot();
GameObject[] players = GameObject.FindGameObjectsWithTag("Player");
foreach(GameObject player in players)
{
if(player.GetComponent<Bot>().enabled==true)
{
bot = player.GetComponent<Bot>();
}
}
map = calculator.getMap();
foreach (Vector3 point in map)
{
//var tracker = (GameObject)Instantiate(SVTracker, new Vector3(point.x, (float)(cGSV*calculator.GSV(point)+55), point.z), Quaternion.identity);
var tracker = (GameObject)Instantiate(SVTracker, new Vector3(point.x, (float)(cLSV*bot.LSV(point)+55), point.z), Quaternion.identity);
//var tracker = (GameObject)Instantiate(SVTracker, new Vector3(point.x, (float)(bot.SV(point)+55), point.z), Quaternion.identity);
if (tracker.transform.position.y > 70)
{
tracker.GetComponent<Renderer>().material.color = new Color((tracker.transform.position.y-70)/7,1-(tracker.transform.position.y-70)/7,0);
}
else
{
tracker.GetComponent<Renderer>().material.color = new Color(0,1-(tracker.transform.position.y-70)/-7,(tracker.transform.position.y-70)/-7,0);
}
}
}
示例2: Start
public void Start()
{
rb = GetComponent<Rigidbody>();
col = GetComponent<SphereCollider>();
col.radius= (float)sightConstant;
dead = false;
health = 100;
ammo = 20;
team = -1;
calculator = Calculator.getCalculator();
transform.position = new Vector3(2.5f, (float)2, 2.5f);
map = calculator.getMap();
}