本文整理汇总了C#中Fish类的典型用法代码示例。如果您正苦于以下问题:C# Fish类的具体用法?C# Fish怎么用?C# Fish使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
Fish类属于命名空间,在下文中一共展示了Fish类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: FishTO
public FishTO(Fish other)
{
this.name = other.name;
this.id = other.id;
if (other.weight != null)
this.weight = other.weight.Value;
if (other.length != null)
this.length = other.length.Value;
this.species = other.species;
if (other.caughtDate != null)
this.caughtDate = other.caughtDate.Value;
if (other.tripId != null)
this.tripId = other.tripId.Value;
this.notes = other.notes;
if (other.caughtTime != null)
this.caughtTime = other.caughtTime.Value;
if (other.girth != null)
this.girth = other.girth.Value;
this.spot = other.spot;
this.presentation = other.presentation;
if (other.depth != null)
this.depth = other.depth.Value;
if (other.clarity != null)
this.clarity = other.clarity.Value;
if (other.temperature != null)
this.temperature = other.temperature.Value;
}
示例2: Handle_BulletHit
void Handle_BulletHit(bool isMiss, Player p, Bullet b, Fish f)
{
if (!isMiss)
{
b.SelfDestroy();
}
}
示例3: ProcessHit
//struct FishAndOddsMulti
//{
// public FishAndOddsMulti(Fish f,int oddMulti)
// {
// F = f;
// OddMulti = oddMulti;
// }
// public Fish F;
// public int OddMulti;
//}
public static void ProcessHit(Bullet b , Fish f)
{
switch(f.HittableTypeS)
{
case "Normal":
Process_NormalFish(b,f);
break;
case "AreaBomb":
Process_AreaBomb(b,f);
break;
case "SameTypeBomb":
Process_FishTypeBomb2(b,f);
break;
case "FreezeBomb":
Process_FreezeBomb(b, f);
break;
case "SameTypeBombEx":
Process_FishTypeBombEx(b, f);
break;
default:
if (Evt_HitExtension != null)
Evt_HitExtension(b, f);
break;
}
}
示例4: CreateFish
/// <summary>
/// 水場に魚を1匹生成する
/// 生成した魚はリストに格納される
/// </summary>
/// <param name="fish">魚</param>
/// <param name="waterPlace">水場</param>
public void CreateFish(Fish fish, WaterPlace waterPlace)
{
//不正検知
if(fish == null || waterPlace == null || fish.gameObject == null || waterPlace.gameObject == null)
{
Debug.LogError("CreateFishの引数に渡されたオブジェクトがNullでした");
return;
}
if(fish.gameObject.tag != "Fish")
{
Debug.LogError("Fishにタグが不適切なオブジェクトが渡されました\nタグに\"Fish\"を設定してください\nオブジェクト名 : " + fish.name);
return;
}
if(waterPlace.gameObject.tag != "WaterPlace")
{
Debug.LogError("WaterPlaceにタグが不適切なオブジェクトが渡されました\nタグに\"WaterPlace\"を設定してください\nオブジェクト名 : " + waterPlace.name);
return;
}
//生成場所の計算
Vector3 waterRange = waterPlace.gameObject.transform.lossyScale;
waterRange.y = 0;
waterRange.x = Random.Range(-waterRange.x, waterRange.x) / 5;
waterRange.z = Random.Range(-waterRange.z, waterRange.z) / 5;
//実体化
Fish f = new Fish();
f.fishPrefab = Instantiate(fish.gameObject,
Vector3.up + waterPlace.gameObject.transform.position + waterRange,
Quaternion.Euler(new Vector3(0, Random.Range(0, 360), 0))) as GameObject;
//参照フィールドへの追加
fishes.Add(f);
}
示例5: crash
public void crash(Fish fish, Form1 form, ArrayList fishList)
{
collision = aquaticAnimal.Bounds.IntersectsWith(fish.aquaticAnimal.Bounds);
if (collision==true)
{
if ((aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon adulto.png") || aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon hembra.png")) && (fish.aquaticAnimal.ImageLocation.Equals(@"Resources\Dorys.png") || fish.aquaticAnimal.ImageLocation.Equals(@"Resources\Nemo.png")))
{
fishList.Remove(fish);
fish.aquaticAnimal.Hide();
}
else if ((aquaticAnimal.ImageLocation.Equals(@"Resources\Dorys.png") || aquaticAnimal.ImageLocation.Equals(@"Resources\Nemo.png")) && (fish.aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon adulto.png") || fish.aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon hembra.png")))
{
fishList.Remove(aquaticAnimal);
aquaticAnimal.Hide();
}
else if ((aquaticAnimal.ImageLocation.Equals(@"Resources\Nemo.png") && fish.aquaticAnimal.ImageLocation.Equals(@"Resources\Nemo.png")))
{
fishList.Remove(fish);
aquaticAnimal.Hide();
}
else if ((aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon adulto.png") && fish.aquaticAnimal.ImageLocation.Equals(@"Resources\tiburon adulto.png")))
{
fishList.Remove(aquaticAnimal);
aquaticAnimal.Hide();
}
}
}
示例6: Msg_FishGenerateWhenEnterWorld_Generated
void Msg_FishGenerateWhenEnterWorld_Generated(Fish f)
{
Transform ts = Instantiate(Prefab_TsEffect) as Transform;
ts.parent = f.transform;
ts.localPosition = Vector3.zero;
ts.localRotation = Quaternion.identity;
}
示例7: fishCatching
//SoundEffect soundEffect;
public fishCatching()
{
graphics = new GraphicsDeviceManager(this);
Content.RootDirectory = "Content";
this.graphics.IsFullScreen = true;
graphics.PreferredBackBufferWidth = 480;
graphics.PreferredBackBufferHeight = 800;
fishes[0] = new Fish(20, 20, false);
fishes[1] = new Fish(200, 100, false);
fishes[2] = new Fish(100, 480, false);
fishes[3] = new Fish(50, 400, false);
fishes[4] = new Fish(200, 40, false);
fishes[5] = new Fish(200, 400, false);
fishes[6] = new Fish(287, 180, false);
fishes[7] = new Fish(160, 280, false);
// Windows Phone 的默认帧速率为 30 fps。
TargetElapsedTime = TimeSpan.FromTicks(33333);
// 延长锁定时的电池寿命。
InactiveSleepTime = TimeSpan.FromSeconds(1);
}
示例8: Handle_FishBulletHit
void Handle_FishBulletHit(bool isMiss, Player p, Bullet b, Fish f)
{
if(isMiss)
{
if (b.IsLockingFish)
b.IsLockingFish = false;
}
}
示例9: eat
public virtual void eat(Fish other)
{
if (_size <= other.size)
{
fishDeathEvent(this, new InfoEventArgs<int>(_size));
GameObject.Destroy(this.gameObject);
}
}
示例10: Handle_BeforeEatFish
void Handle_BeforeEatFish(Fish eatter, Fish beEattedFish)
{
if (eatter.AniSprite.IsPlaying(AnimationToPlayName)
&& !IsContPlay)
return;
eatter.AniSprite.Play(AnimationToPlayName);
}
示例11: keepFish
public void keepFish(Fish caught)
{
caughtFish.Add(caught);
TackleBoxUI.tackleBox.addFish();
Debug.Log("You caught a: " + caughtFish[caughtFish.Count - 1].getName() + " Weight: " + caughtFish[caughtFish.Count - 1].getWeight());
// return fishString;
}
示例12: Mission
public Mission(Fish Agent, Objective Obj, Func<BitArray> Targets, bool OverrideDropMission = false, bool AttackAlongTheWay = true)
{
m_agent = Agent;
m_obj = Obj;
m_targets = Targets;
m_attackAlongTheWay = AttackAlongTheWay;
m_overrideDropMission = OverrideDropMission;
}
示例13: Handle_FishKilled
void Handle_FishKilled(Player killer, Bullet b, Fish f)
{
if (!mViewFishPrefabCache.ContainsKey(f.TypeIndex))
{
return;
}
StartCoroutine(_Coro_EffectProcessing(b.Score * f.Odds * b.FishOddsMulti, killer, f.TimeDieAnimation, false));
}
示例14: Handle_PlayerGainScoreFromFish
void Handle_PlayerGainScoreFromFish(Player p, int score, Fish fishFirst,Bullet b)
{
if (GameMain.Singleton.BSSetting.OutBountyType_.Val == OutBountyType.OutCoinButtom
|| GameMain.Singleton.BSSetting.OutBountyType_.Val == OutBountyType.OutTicketButtom)
{
int oddNum = fishFirst.HittableTypeS == "Normal" ? fishFirst.Odds : (score / b.Score);
CoinStacks[p.Idx].RequestViewOneStack(score, oddNum, b.Score);
}
}
示例15: AttachFish
public void AttachFish(Fish fish)
{
//ConfigurableJoint joint = fish.GetComponent<ConfigurableJoint>();
//joint.connectedBody = this.rigidbody;
fish.rigidbody.isKinematic = true;
fishAttached = fish;
fishOutOfWater = false;
}