• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# Ship类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中Ship的典型用法代码示例。如果您正苦于以下问题:C# Ship类的具体用法?C# Ship怎么用?C# Ship使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



Ship类属于命名空间,在下文中一共展示了Ship类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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


示例16: ApplyPowerup

        protected override void ApplyPowerup(Ship ship)
        {
            //new EffectNode(Config.LightningSpriteSheet, this.Position);
            PlayerShip applyShip;
            applyShip = ship.GetRoot() as PlayerShip;

            //for (int i = Enemy.Enemies.Count - 1; i >= 0; i--)
            //{
            //    ProjectileBulletGreenBeam.FireBullet(Vector2.Normalize(Enemy.Enemies[i].Position - applyShip.Position), applyShip.Position);
            //}
            //for (int i = Enemy.Enemies.Count - 1; i >= 0; i--)
            //{
            //    ProjectileBulletGreenBeam.FireBullet(Vector2.Normalize(Enemy.Enemies[i].Position - applyShip.Position), applyShip.Position);
            //}
            //for (int i = Enemy.Enemies.Count - 1; i >= 0; i--)
            //{
            //    ProjectileBulletGreenBeam.FireBullet(Vector2.Normalize(Enemy.Enemies[i].Position - applyShip.Position), applyShip.Position);
            //}
            //for (int i = Enemy.Enemies.Count - 1; i >= 0; i--)
            //{
            //    ProjectileBulletGreenBeam.FireBullet(Vector2.Normalize(Enemy.Enemies[i].Position - applyShip.Position), applyShip.Position);
            //}
            //for (int i = Enemy.Enemies.Count - 1; i >= 0; i--)
            //{
            //    ProjectileBulletGreenBeam.FireBullet(Vector2.Normalize(Enemy.Enemies[i].Position - applyShip.Position), applyShip.Position);
            //}

            //AoEWeaponBurstWave tempWeapon = new AoEWeaponBurstWave(applyShip, 0, 200, 50f);
            AoEWeaponBurstWave tempWeapon = new AoEWeaponBurstWave(applyShip, 0, 100, 50f);
            tempWeapon.StartFire();
        }
开发者ID:JoeMarsh,项目名称:Astro-Flare-Rampage,代码行数:31,代码来源:PowerupDamageAll.cs


示例17: ApplyPowerup

        protected override void ApplyPowerup(Ship ship)
        {
            PlayerShip applyShip;
            EnemyPlayerShip applyAIShip;

            if (ship == Player.Ship)
            {
                if (Config.SoundFXOn)
                    GameStateManagementGame.Instance.soundManager.PlaySound("FX1", 0.7f);  
 
                applyShip = ship.GetRoot() as PlayerShip;

                if (applyShip.Shield.Health < Config.ShieldHealth)
                {
                    if (Config.ship1Active)
                        applyShip.Shield.ShieldRegen(Config.ShieldsPowerupValue + 5);
                    else
                        applyShip.Shield.ShieldRegen(Config.ShieldsPowerupValue);
                }
            }

            if (ship == Player.EnemyPlayer)
            {
                applyAIShip = ship.GetRoot() as EnemyPlayerShip;

                if (applyAIShip.Shield.Health < Config.ShieldHealth)
                    applyAIShip.Shield.ShieldRegen(Config.ShieldsPowerupValue);
            }
        }
开发者ID:JoeMarsh,项目名称:Astro-Flare-Rampage,代码行数:29,代码来源:PowerupShields.cs


示例18: AddDrones

        public static void AddDrones(Ship ship)
        {
            const int DRONE_BANDWIDTH_ID = 1271;
            var bandwidth = ship.GetAttributeById(DRONE_BANDWIDTH_ID)
                .Value;

            if (bandwidth <= 25)
            {
                AddDrones(ship, _hobgoblin, (int) bandwidth / 5);
                return;
            }

            if (bandwidth <= 50)
            {
                AddDrones(ship, _hammerhead, (int) bandwidth / 10);
                AddDrones(ship, _hobgoblin, ((int) bandwidth / 10) / 5);
                return;
            }
            //TODO verteilunug fuer <= 100 sieht normalerweise anders aus
            AddDrones(ship, _ogre, (int) bandwidth / 25);

            var rest = (int) bandwidth % 25;
            AddDrones(ship, _hammerhead, rest / 10);

            var restMed = rest % 10;
            AddDrones(ship, _hobgoblin, restMed / 5);
        }
开发者ID:rischwa,项目名称:eve-fast-fitting-assessment,代码行数:27,代码来源:DamageAnalysis.cs


示例19: Activate

 public void Activate(Ship activator, int slot)
 {
     if (Cooldown <= Mathf.Epsilon) //cd check
     {
         behaviour.Activate(activator, slot);
     }
 }
开发者ID:spriest487,项目名称:spacetrader-unity,代码行数:7,代码来源:HardpointModule.cs


示例20: NotifyDeath

 public override void NotifyDeath(Ship ship, Ship killer)
 {
     if (ship.name == "Ghost Ship")
     {
         failed = true;
     }
 }
开发者ID:spriest487,项目名称:spacetrader-unity,代码行数:7,代码来源:GhostShipEscortQuest.cs



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


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ShipConstruct类代码示例发布时间:2022-05-24
下一篇:
C# ShellObject类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap