本文整理汇总了C#中Ship.SetTargetTransform方法的典型用法代码示例。如果您正苦于以下问题:C# Ship.SetTargetTransform方法的具体用法?C# Ship.SetTargetTransform怎么用?C# Ship.SetTargetTransform使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Ship
的用法示例。
在下文中一共展示了Ship.SetTargetTransform方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: Search
public Search(Ship inShip, Vector3 bPos)
{
ship = inShip;
fleetManager = ship.manager;
beacon = GameObject.Instantiate(Resources.Load("Ai Objects/SearchBeacon")) as GameObject;
beacon.name = "Beacon_Flee_" + ship.gameObject.name;
//Debug.Log(beacon.name);
//beaconScript = beacon.GetComponent<BeaconScript>();
//beaconScript.SetOwner(ship);
//RenewBeacon();
beacon.transform.position = bPos;
ship.SetTargetTransform(beacon.transform);
}
示例2: TeamEngage
public TeamEngage(Ship inShip)
{
ship = inShip;
leader = inShip.getFleetLeader();
if (ship != leader)
ship.SetTargetTransform(leader.GetTarget());
predictTarget = new PositionPrediction(inShip);
if (leader.target == null)
{
LeaderChecks();
}
if(ship.photonView.isMine && leader.target != null)
{
RandomPsuedoUpVector();
ship.photonView.RPC("TeamEngageRPC", PhotonTargets.Others, psuedoUpVector, ship.fleetLeader.target.GetComponent<PhotonView>().viewID);
}
}