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


C# Critter.GetIsPlayer方法代码示例

本文整理汇总了C#中Critter.GetIsPlayer方法的典型用法代码示例。如果您正苦于以下问题:C# Critter.GetIsPlayer方法的具体用法?C# Critter.GetIsPlayer怎么用?C# Critter.GetIsPlayer使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Critter的用法示例。


在下文中一共展示了Critter.GetIsPlayer方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: LockEvo

    public void LockEvo(Critter critter)
    {
        if(critter.unlockedEvos.Contains(this)){
            critter.unlockedEvos.Remove(this);
            critter.unlockedEvos.TrimExcess();
        }

        if(critter.GetIsPlayer()){
            CheckCurrentBuyState(critter);
        }
    }
开发者ID:Paulgherve1,项目名称:Critters,代码行数:11,代码来源:Adaptation.cs

示例2: CheckCurrentBuyState

    public void CheckCurrentBuyState(Critter critter)
    {
        if(critter.GetIsPlayer()){
            if(critter){
                if (critter.activeEvos.Contains(this)){
                    if (isMajor)
                    {
                        if (critter.equipedEvos.Contains(this))
                        {
                            if (critter.lockedEvos.Contains(this))
                            {
                                currentBuyState = playerBuyState.LOCKED;
                            }
                            else
                            {
                                currentBuyState = playerBuyState.EQUIPED;
                            }
                        }
                        else
                        {
                            if (critter.lockedEvos.Contains(this))
                            {
                                currentBuyState = playerBuyState.LOCKED;
                            }
                            else if (Prerequisites1.Count > 0)
                            {
                                foreach (Adaptation item in Prerequisites1)
                                {
                                    if (critter.activeEvos.Contains(item))
                                    {
                                        currentBuyState = playerBuyState.CANEQUIP;
                                    }
                                    else
                                    {
                                        currentBuyState = playerBuyState.NOREFUND;
                                        break;
                                    }
                                }
                            }
                            else if (currentBuyState == playerBuyState.NOREFUND)
                            {
                                foreach (Adaptation item in Prerequisites2)
                                {
                                    if (critter.activeEvos.Contains(item))
                                    {
                                        currentBuyState = playerBuyState.CANEQUIP;
                                    }
                                    else
                                    {
                                        currentBuyState = playerBuyState.NOREFUND;
                                    }
                                }
                            }
                            else
                            {
                                currentBuyState = playerBuyState.CANEQUIP;
                            }
                        }
                    }

                    else if (hasUnlocks){
                        foreach(Adaptation item in Unlocks){
                            if(critter.activeEvos.Contains(item)){
                                if (item.GetCurrentBuyState() == playerBuyState.EQUIPED)
                                {
                                    currentBuyState = playerBuyState.NOREFUND;
                                    break;
                                }
                                else if (item.GetCurrentBuyState() == playerBuyState.ACTIVE)
                                {
                                    currentBuyState = playerBuyState.NOREFUND;
                                    break;
                                }
                                else
                                {
                                    currentBuyState = playerBuyState.ACTIVE;
                                }
                            }
                            else{
                                currentBuyState = playerBuyState.ACTIVE;
                            }
                        }
                    }

                    else{
                        if(!hasUnlocks){
                            currentBuyState = playerBuyState.ACTIVE;
                        }
                    }
                }

                else if(critter.unlockedEvos.Contains(this)){
                    foreach (Adaptation item in critter.activeEvos)
                    {
                        if (!item.isMajor)
                        {
                            if (item.Conflicts.Contains(this))
                            {
                                currentBuyState = playerBuyState.LOCKED;
                                break;
//.........这里部分代码省略.........
开发者ID:Paulgherve1,项目名称:Critters,代码行数:101,代码来源:Adaptation.cs

示例3: Equip

    //Equips Major evo to critter's dataSlot; then pushes all new requirements
    public void Equip(Critter critter, SlotData dataSlot)
    {
        dataSlot.EquipSlot(this);
        LockConflicts(critter);
        ModifyStats(critter);

        if(critter.GetIsPlayer()){
            CheckCurrentBuyState(critter);

            foreach (Adaptation item in Prerequisites1)
            {
                item.CheckCurrentBuyState(critter);
            }
            foreach (Adaptation item in Prerequisites2)
            {
                item.CheckCurrentBuyState(critter);
            }
            foreach (Adaptation item in Unlocks)
            {
                item.CheckCurrentBuyState(critter);
            }
        }

        critter.GenerateDiet();
        critter.GenerateLocomotion();
    }
开发者ID:Paulgherve1,项目名称:Critters,代码行数:27,代码来源:Adaptation.cs

示例4: UnlockConflicts

    private void UnlockConflicts(Critter critter)
    {
        bool isPlayer = critter.GetIsPlayer();

        foreach (Adaptation item in Conflicts){
            if(critter.lockedEvos.Contains(item)){

                if (!item.LockCheck(critter)){
                    item.UnlockConflict(critter);

                    if (isPlayer){
                        item.CheckCurrentBuyState(critter);
                    }
                }
            }
        }
    }
开发者ID:Paulgherve1,项目名称:Critters,代码行数:17,代码来源:Adaptation.cs

示例5: BuyEvo

    public void BuyEvo(Critter critter)
    {
        float pts = critter.GetEvoPts();

        if (pts >= cost && !critter.activeEvos.Contains(this)) {
            Activate(critter);

            critter.ModifyEvoPts(-cost);

            if(isMajor && !critter.GetIsPlayer()){
                EquipOpenSlot(critter);
            }
        }

        critter.statUpdateQueued = true;
    }
开发者ID:Paulgherve1,项目名称:Critters,代码行数:16,代码来源:Adaptation.cs

示例6: Deactivate

    void Deactivate(Critter critter)
    {
        critter.activeEvos.Remove(this);
        critter.unlockedEvos.Add(this);
        critter.activeEvos.TrimExcess();
        critter.unlockedEvos.TrimExcess();

        LockUnlocks(critter);

        if (!isMajor){
            RefundStats(critter);
            UnlockConflicts(critter);
        }

        if(critter.GetIsPlayer()){
            CheckCurrentBuyState(critter);

            foreach (Adaptation item in Prerequisites1)
            {
                item.CheckCurrentBuyState(critter);
            }
            foreach (Adaptation item in Prerequisites2)
            {
                item.CheckCurrentBuyState(critter);
            }
            foreach (Adaptation item in Unlocks)
            {
                item.CheckCurrentBuyState(critter);
            }
        }
    }
开发者ID:Paulgherve1,项目名称:Critters,代码行数:31,代码来源:Adaptation.cs

示例7: UnlockEvo

    public void UnlockEvo(Critter critter)
    {
        bool isPlayer = critter.GetIsPlayer();
        bool shouldUnlock = CheckPrereqsCompleted(critter);

        if(!critter.unlockedEvos.Contains(this)){
            if (shouldUnlock) {
                critter.unlockedEvos.Add(this);
                critter.unlockedEvos.TrimExcess();

                if (isPlayer)
                {
                    foreach (Adaptation item in Prerequisites1)
                    {
                        item.CheckCurrentBuyState(critter);
                    }

                    foreach (Adaptation item in Prerequisites2)
                    {
                        item.CheckCurrentBuyState(critter);
                    }

                    foreach (Adaptation item in Unlocks)
                    {
                        item.CheckCurrentBuyState(critter);
                    }

                    CheckCurrentBuyState(critter);
                }
            }
        }
    }
开发者ID:Paulgherve1,项目名称:Critters,代码行数:32,代码来源:Adaptation.cs

示例8: Unequip

    //Unequips evo from selected slot on selected critter and updates buttons for player.
    public void Unequip(Critter critter, SlotData dataSlot)
    {
        dataSlot.UnequipSlot();
        UnlockConflicts(critter);

        RefundStats(critter);

        if(critter.GetIsPlayer()){
            CheckCurrentBuyState(critter);

            foreach (Adaptation item in Prerequisites1)
            {
                item.CheckCurrentBuyState(critter);
            }
            foreach (Adaptation item in Prerequisites2)
            {
                item.CheckCurrentBuyState(critter);
            }
            foreach (Adaptation item in Unlocks)
            {
                item.CheckCurrentBuyState(critter);
            }
            foreach (Adaptation item in Conflicts)
            {
                item.CheckCurrentBuyState(critter);
            }
        }
        critter.UnequipSpecials(this);
    }
开发者ID:Paulgherve1,项目名称:Critters,代码行数:30,代码来源:Adaptation.cs

示例9: UnlockCritterStartEvos

    public void UnlockCritterStartEvos(Critter critter)
    {
        foreach(Adaptation targetEvo in startingUnlocks){
            if(!critter.activeEvos.Contains(targetEvo)) {
                targetEvo.BuyEvo(critter);

                if(critter.GetIsPlayer()){
                    if (targetEvo.isMajor) {
                        targetEvo.EquipOpenSlot(critter);
                    }
                }
            }
        }
    }
开发者ID:Paulgherve1,项目名称:Critters,代码行数:14,代码来源:CritterGenerator.cs

示例10: Extinction

    //Cleans a creature from lists and game when they go extinct.
    public void Extinction(Critter DeadCritter)
    {
        totalCritters--;

        //print ("Critter# " + DeadCritter.GetNumber() + " done gone extint. Total Critters = " + totalCritters + ".\r\n");
        if (DeadCritter.GetIsPlayer())
        {
            EndGame();
        }
        else
        {
            CritterList.Remove(DeadCritter);
            CritterList.TrimExcess();

            DeadCritter.gameObject.SetActive(false);

            //turnTimer.PhaseComplete();
        }
    }
开发者ID:Paulgherve1,项目名称:Critters,代码行数:20,代码来源:GameController.cs


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