本文整理汇总了C#中Ship类的典型用法代码示例。如果您正苦于以下问题:C# Ship类的具体用法?C# Ship怎么用?C# Ship使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Ship类属于命名空间,在下文中一共展示了Ship类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: LoadRaidMapScene
public static void LoadRaidMapScene(WorldMapHexagonTileData tileData, Ship ship)
{
SelectedTileData = tileData;
SelectedShip = ship;
Application.LoadLevel("RaidMap");
}
示例2: Update
internal void Update(Ship[] s)
{
this.ships = s;
if (this.ships.Length == 0)
{
this.RejuvenateTime = null;
return;
}
var condition = this.ships.Min(x => x.Condition);
if (condition != this.minCondition)
{
this.minCondition = condition;
var rejuvnate = DateTimeOffset.Now; // 回復完了予測時刻
while (condition < KanColleClient.Current.Settings.ReSortieCondition)
{
rejuvnate = rejuvnate.AddMinutes(3);
condition += 3;
if (condition > 49) condition = 49;
}
this.RejuvenateTime = rejuvnate <= DateTimeOffset.Now
? (DateTimeOffset?)null
: rejuvnate;
}
}
示例3: Start
// Use this for initialization
void Start () {
currentTimeTilChangePosition = 0;
if(ship == null) {
ship = gameObject.GetComponent<Ship>();
}
}
示例4: Start
// Use this for initialization
void Start ()
{
ship = GetComponent<Ship> ();
currentCooldown = cooldownTime;
}
示例5: TestAllStop0Radians
public void TestAllStop0Radians()
{
var ship = new Ship(4000);
Assert.AreEqual(0, ship.Velocity.Magnitude(), "new ship wasn't stopped");
Assert.AreEqual(0, ship.Orientation, "ship wasn't oriented 0");
ship.Update(TimeSpan.FromSeconds(0.25));
ship.ImpulsePercentage = 100;
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
Assert.AreEqual(0, ship.Orientation, "ship turned during acceleration");
ship.TargetSpeedMetersPerSecond = 0;
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
ship.Update(TimeSpan.FromSeconds(0.25));
Assert.AreNotEqual(Vector3.Zero, ship.Velocity, "Ship couldn't have been stopped by now.");
Assert.IsTrue(Utility.ApproximatelyEqual(0, ship.Orientation), "ship turned during all stop");
ship.Update(TimeSpan.FromSeconds(0.25));
Assert.AreEqual(Vector3.Zero, ship.Velocity, "velocity wasn't stopped long after all stop message sent");
}
示例6: Start
// Use this for initialization
void Start ()
{
m_Ship = GetComponent<Ship>();
m_IsDashReady = true;
m_StickDelay = 0.5f;
m_DashCoolDown = 7;
}
示例7: UpdateBehaviour
public void UpdateBehaviour(Ship owner)
{
if (behaviour)
{
behaviour.UpdateForOwner(owner);
}
}
示例8: Equals
protected override bool Equals(Ship other)
{
//doesn't check direction
return ShipPosition.X == other.ShipPosition.X &&
ShipPosition.Y == other.ShipPosition.Y &&
Length == other.Length;
}
示例9: Start
public void Start()
{
if(null == ship) {
ship = GameObject.Find("Ship").GetComponent<Ship>();
}
ExhaustTrail.transform.parent = gameObject.transform;
}
示例10: Activate
public override void Activate(Ship activator)
{
var moorable = activator.Moorable;
Debug.Assert(moorable);
moorable.BeginAutoDocking(this);
}
示例11: WeaponAuto
public WeaponAuto(Ship ship, double fireInterval)
: base(ship)
{
this.FireInterval = fireInterval;
this.timer = new Timer();
this.timer.Fire += new NotifyHandler(timer_Fire);
}
示例12: Regroup
// Use this for initialization
public Regroup(Ship inShip)
{
ship = inShip;
target = ship.fleetLeader.transform;
if(ship.photonView.isMine)
ship.photonView.RPC("RegroupRPC", PhotonTargets.Others, null);
}
示例13: ExecuteOrder
public override List<string> ExecuteOrder(Ship ship)
{
List<string> result = new List<string>();
result.Add(moveShip(ship));
this.IsCompleted = true;
return result;
}
示例14: MoveToShipAtRange
public MoveToShipAtRange(Ship targetShip, int range, LocationCollection locations)
{
this.OrderValues = new object[3];
this.OrderValues[0] = targetShip;
this.OrderValues[1] = range;
this.OrderValues[2] = locations;
}
示例15: DamageMessage
public DamageMessage (float dmg, Vector3 dir, float dmgFrce, Weapon.DamageBias bs, Weapon.WeaponType tp, Ship own)
{
damage = dmg;
damageDirection = dir;
damageForce = dmgFrce;
bias = bs;
type = tp;
if (own != null)
owner = own.gameObject;
else
return;
hasShip = true;
try
{
viewID = own.GetComponent<PhotonView>().viewID;
}
catch
{
Debug.Log(owner.name + " does not have a photon View ID");
}
if (own is AiShip)
player = false;
else
player = true;
}