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

C# Fish类代码示例

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

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



Fish类属于命名空间,在下文中一共展示了Fish类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
 }
开发者ID:jannunzi,项目名称:CS5610f14,代码行数:27,代码来源:FishTO.cs


示例2: Handle_BulletHit

 void Handle_BulletHit(bool isMiss, Player p, Bullet b, Fish f)
 {
     if (!isMiss)
     {
         b.SelfDestroy();
     }
 }
开发者ID:minh3d,项目名称:Fish,代码行数:7,代码来源:Module_Bullet.cs


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


示例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);
    }
开发者ID:EsProgram,项目名称:CatLife,代码行数:40,代码来源:ManagedFishInstantiate.cs


示例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();
                  }

             }
        }
开发者ID:krivas,项目名称:Pecera,代码行数:29,代码来源:AnimalAcuatico.cs


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


示例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);
        }
开发者ID:Zodiac-Evil,项目名称:Imagine-Cup-Game-Dev,代码行数:26,代码来源:fishCatching.cs


示例8: Handle_FishBulletHit

 void Handle_FishBulletHit(bool isMiss, Player p, Bullet b, Fish f)
 {
     if(isMiss)
     {
         if (b.IsLockingFish)
             b.IsLockingFish = false;
     }
 }
开发者ID:minh3d,项目名称:Fish,代码行数:8,代码来源:Module_GunLocker.cs


示例9: eat

 public virtual void eat(Fish other)
 {
     if (_size <= other.size)
     {
         fishDeathEvent(this, new InfoEventArgs<int>(_size));
         GameObject.Destroy(this.gameObject);
     }
 }
开发者ID:Seth-W,项目名称:SmallMarlin,代码行数:8,代码来源:Fish.cs


示例10: Handle_BeforeEatFish

    void Handle_BeforeEatFish(Fish eatter, Fish beEattedFish)
    {
        if (eatter.AniSprite.IsPlaying(AnimationToPlayName)
            && !IsContPlay)
            return;

        eatter.AniSprite.Play(AnimationToPlayName);
    }
开发者ID:minh3d,项目名称:Fish,代码行数:8,代码来源:Ef_PlayAnimationWhenEatFish.cs


示例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;
    }
开发者ID:kurix2,项目名称:FishFishRevolution-PC,代码行数:8,代码来源:FishManager.cs


示例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;
 }
开发者ID:austingantner,项目名称:MegaMinerAI11-Reef,代码行数:8,代码来源:Mission.cs


示例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));
    }
开发者ID:minh3d,项目名称:Fish,代码行数:9,代码来源:Ef_KillBlueShark.cs


示例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);
     }
 }
开发者ID:minh3d,项目名称:Fish,代码行数:9,代码来源:Ef_CoinStack.cs


示例15: AttachFish

    public void AttachFish(Fish fish)
    {
        //ConfigurableJoint joint = fish.GetComponent<ConfigurableJoint>();
        //joint.connectedBody = this.rigidbody;

        fish.rigidbody.isKinematic = true;
        fishAttached = fish;
        fishOutOfWater = false;
    }
开发者ID:kettle11,项目名称:Serious-Fishing,代码行数:9,代码来源:Lure.cs


示例16: Awake

 //IEnumerator Start()
 //{
 //    mFish = GetComponent<Fish>();
 //    if (mFish == null)
 //        yield break;
 //    mOriClipidx = mFish.AniSprite.clipId;
 //    tk2dSpriteAnimationClip aniClip = mFish.AniSprite.anim.clips[mFish.AniSprite.anim.GetClipIdByName(AniName)];
 //    float aniLength = aniClip.frames.Length / aniClip.fps;
 //    while (true)
 //    {
 //        yield return new WaitForSeconds(Interval);
 //        mFish.AniSprite.Play(AniName,0F);
 //        yield return new WaitForSeconds(aniLength);
 //        mFish.AniSprite.Play(mOriClipidx,0F);
 //    }
 //}
 void Awake()
 {
     mFish = GetComponent<Fish>();
     if (mFish == null)
         return;
     mOriClipidx = mFish.AniSprite.DefaultClipId;
     tk2dSpriteAnimationClip aniClip = mFish.AniSprite.Library.clips[mFish.AniSprite.Library.GetClipIdByName(AniName)];
     mSpecAniLength = aniClip.frames.Length / aniClip.fps;
 }
开发者ID:minh3d,项目名称:Fish,代码行数:25,代码来源:Ef_FishPlaySpecAniInterval.cs


示例17: LockAt

    public void LockAt(Player p,Fish f)
    {
        //Debug.Log("LockAt " + f.name + "  p.idx = " + p.Idx);
        mLockedTarget[p.Idx] = f;

        p.GunInst.Rotatable = false;
        ModuleBullet.Fireable[p.Idx] = false;
        StartCoroutine(_Coro_Locking(p));
    }
开发者ID:minh3d,项目名称:Fish,代码行数:9,代码来源:Module_GunLocker.cs


示例18: Awake

    void Awake()
    {
        FishEx_FishEatter fe = GetComponent<FishEx_FishEatter>();
        mFish = fe._Fish;
        mFish.AniSprite.AnimationCompleted += Handle_FishAniStop;
        if (fe != null)
            fe.EvtBeforeEatFish += Handle_BeforeEatFish;

        mOriginClip = mFish.AniSprite.DefaultClip;
    }
开发者ID:minh3d,项目名称:Fish,代码行数:10,代码来源:Ef_PlayAnimationWhenEatFish.cs


示例19: Handle_Resumme

 void Handle_Resumme( Fish f )
 {
     if(f.TypeIndex == MyFish.TypeIndex&& isChangGenerator)
     {
         //Debug.Log( "inresumme" );
         // float iSp = MySwimmer.Speed;
         MyFishGenerator.MaxFishAtWorld = mMaxFishAtWorldOrigin;//�ָ�ԭ���������Ŀ
         isChangGenerator = false;
     }
 }
开发者ID:minh3d,项目名称:Fish,代码行数:10,代码来源:ChangeFishGenerator.cs


示例20: DetachFish

 public void DetachFish()
 {
     if(fishAttached != null)
     {
         fishAttached.rigidbody.position = fishAttached.transform.position;
         fishAttached.rigidbody.velocity = Vector3.zero;
         fishAttached.rigidbody.isKinematic = true;
         fishAttached = null;
     }
 }
开发者ID:kettle11,项目名称:Serious-Fishing,代码行数:10,代码来源:Lure.cs



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


鲜花

握手

雷人

路过

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

请发表评论

全部评论

专题导读
上一篇:
C# FixedArray2类代码示例发布时间:2022-05-24
下一篇:
C# FisException类代码示例发布时间: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