当前位置: 首页>>代码示例>>C#>>正文


C# Ship类代码示例

本文整理汇总了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");
    }
开发者ID:Malakahh,项目名称:VikingGame,代码行数:7,代码来源:DataCarrier.cs

示例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;
			}
		}
开发者ID:Kadenz5,项目名称:KanColleViewer,代码行数:29,代码来源:FleetCondition.cs

示例3: Start

	// Use this for initialization
	void Start () {
		currentTimeTilChangePosition = 0;

		if(ship == null) {
			ship = gameObject.GetComponent<Ship>();
		}
	}
开发者ID:joe-engalan,项目名称:IHW,代码行数:8,代码来源:SporadicMovement.cs

示例4: Start

	// Use this for initialization
	void Start ()
	{
		ship = GetComponent<Ship> ();

		currentCooldown = cooldownTime;
	
	}
开发者ID:joe-engalan,项目名称:IHW,代码行数:8,代码来源:SporadicFiring.cs

示例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");
 }
开发者ID:AdmiralPotato,项目名称:ggj2013,代码行数:31,代码来源:AllStopTests.cs

示例6: Start

 // Use this for initialization
 void Start ()
 {
     m_Ship = GetComponent<Ship>();
     m_IsDashReady = true;
     m_StickDelay = 0.5f;
     m_DashCoolDown = 7;
 }
开发者ID:BaptisteBillet,项目名称:Barababor,代码行数:8,代码来源:ShipDashBehavior.cs

示例7: UpdateBehaviour

 public void UpdateBehaviour(Ship owner)
 {
     if (behaviour)
     {
         behaviour.UpdateForOwner(owner);
     }
 }
开发者ID:spriest487,项目名称:spacetrader-unity,代码行数:7,代码来源:HardpointModule.cs

示例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;
 }
开发者ID:else-if,项目名称:homeworks,代码行数:7,代码来源:PatrolBoat.cs

示例9: Start

 public void Start()
 {
     if(null == ship) {
         ship = GameObject.Find("Ship").GetComponent<Ship>();
     }
     ExhaustTrail.transform.parent = gameObject.transform;
 }
开发者ID:dkoontz,项目名称:Gamma4,代码行数:7,代码来源:Thruster.cs

示例10: Activate

    public override void Activate(Ship activator)
    {
        var moorable = activator.Moorable;
        Debug.Assert(moorable);

        moorable.BeginAutoDocking(this);
    }
开发者ID:spriest487,项目名称:spacetrader-unity,代码行数:7,代码来源:SpaceStation.cs

示例11: WeaponAuto

 public WeaponAuto(Ship ship, double fireInterval)
     : base(ship)
 {
     this.FireInterval = fireInterval;
     this.timer = new Timer();
     this.timer.Fire += new NotifyHandler(timer_Fire);
 }
开发者ID:JoeMarsh,项目名称:Astro-Flare-Rampage,代码行数:7,代码来源:WeaponAuto.cs

示例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);
 }
开发者ID:KenReaGameDev,项目名称:Apparent-Horizon,代码行数:8,代码来源:Regroup.cs

示例13: ExecuteOrder

 public override List<string> ExecuteOrder(Ship ship)
 {
     List<string> result = new List<string>();
     result.Add(moveShip(ship));
     this.IsCompleted = true;
     return result;
 }
开发者ID:NevermoreDCE,项目名称:Dalek,代码行数:7,代码来源:MoveToShipAtRange.cs

示例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;
 }
开发者ID:NevermoreDCE,项目名称:Dalek,代码行数:7,代码来源:MoveToShipAtRange.cs

示例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;
	}
开发者ID:KenReaGameDev,项目名称:Apparent-Horizon,代码行数:28,代码来源:DamageMessage.cs


注:本文中的Ship类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。