當前位置: 首頁>>代碼示例>>C#>>正文


C# Cat.DisableAttackListener方法代碼示例

本文整理匯總了C#中Cat.DisableAttackListener方法的典型用法代碼示例。如果您正苦於以下問題:C# Cat.DisableAttackListener方法的具體用法?C# Cat.DisableAttackListener怎麽用?C# Cat.DisableAttackListener使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在Cat的用法示例。


在下文中一共展示了Cat.DisableAttackListener方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: ShowTrainingStep


//.........這裏部分代碼省略.........
                _doors[(_goAwayDoorIndex)].Close();
                _doorsTimerController.Unstick();
                StartCoroutine(WaitAndMoveNext(_doorsTimerController.GetCurrentRemainingTime() + 3));
                break;
            case 20:
                _goAwayDoorIndex = Randomizer.GetInRange(0, _doors.Length);
                _doorsTimerController.OpenDoors();

                int index = Randomizer.GetInRange(0, _doors.Length);
                _doors[index].OpenAndSpawnByName("granny", Spawner.TicketAdditionMode.WithTicket);
                index = Randomizer.GetInRange(0, _doors.Length);
                _doors[index].OpenAndSpawnByName("cat", Spawner.TicketAdditionMode.WithoutTicket);
                StartCoroutine(WaitAndMoveNext(0.1f));
                break;
            case 21:
                _doorsTimerController.SetMovementLocked(true);
                GameObject grannyObject = GameObject.Find("granny(Clone)");
                _grannyPassenger = grannyObject.GetComponent<Granny>();
                GameObject catObject = GameObject.Find("cat(Clone)");

                _catPassenger = catObject.GetComponent<Cat>();
                _catPassenger.SetMaximumAttackProbabilityForTraining();
                _grannyPassenger.SetMaximumAttackProbabilityForTraining();
                _grannyPassenger.SetConductorAttackDenied(true);
                _catPassenger.SetConductorAttackDenied(true);
                _catPassenger.SetFlyAwayDenied(true);
                _grannyPassenger.SetFlyAwayDenied(true);
                _catPassenger.SetHalfImmortal(true);
                _grannyPassenger.SetHalfImmortal(true);
                _hero = GameObject.Find("hero").GetComponent<ConductorSM>();
                _hero.SetHalfImmortal(true);
                break;
            case 22:
                _grannyPassenger.DisableAttackListener();
                _catPassenger.DisableAttackListener();
                if (_attackedPassenger != null)
                {
                    DisplayArrowForPassenger((PassengerSM)_attackedPassenger);
                }
                break;
            case 23:
                Time.timeScale = 0;
                Destroy(_activeArrow);
                _shortConductorWindow.DisplayText(StringResources.GetLocalizedString("Training12"), false);
                break;
            case 24:
                _shortConductorWindow.DisplayText(StringResources.GetLocalizedString("Training13"), false);
                break;
            case 25:
                _grannyPassenger.SetDragListenerEnabled(true);
                _catPassenger.SetDragListenerEnabled(true);
                _killedCounter.SetActive(true);
                _shortConductorWindow.DisplayText(StringResources.GetLocalizedString("Training14"), true);
                break;
            case 26:
                Time.timeScale = 1;
                _catPassenger.AttackTarget = _grannyPassenger;
                break;
            case 27:
                _grannyPassenger.SetDragListenerEnabled(false);
                _grannyPassenger.SetCounterAttackProbability(0);
                _catPassenger.SetDragListenerEnabled(false);
                _catPassenger.SetConductorAttackDenied(false);
                _catPassenger.SetPassengerAttackDenied(true);
                _hero.SetAttackListenerActivated();
                _catPassenger.AttackTarget = _hero;
開發者ID:Syjgin,項目名稱:zerotram,代碼行數:67,代碼來源:TrainingHandler.cs


注:本文中的Cat.DisableAttackListener方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。