コード例 #1
0
        private void Update()
        {
            if (_abs == null)
            {
                _assigned = false;
                _abs      = GameObject.Find("Absolute Radiance");
            }

            else if (!_assigned)
            {
                _assigned = true;
                Logger.Log("[Ultimatum Radiance] Found the Radiance!");
                _abs.AddComponent <Abs>();
            }
        }
コード例 #2
0
ファイル: napalm.cs プロジェクト: emodeca/redwing
        private void Update()
        {
            if (fireGenerator == null)
            {
                return;
            }

            if (cachedEnemyHM.isDead)
            {
                Destroy(fireGenerator);
                return;
            }

            var newPos = gameObject.transform.position;

            newPos.z = -1f;
            fireGenerator.transform.localPosition = newPos;

            var particleList = new ParticleSystem.Particle[fieryParticles.particleCount];

            fieryParticles.GetParticles(particleList);
            for (var i = 0; i < particleList.Length; ++i)
            {
                var lifePercentage = particleList[i].remainingLifetime / particleList[i].startLifetime;
                particleList[i].startColor = Color.Lerp(Color.clear, Color.white, lifePercentage);
            }

            fieryParticles.SetParticles(particleList, fieryParticles.particleCount);

            if (cachedEnemySprite == null)
            {
                return;
            }

            if (visible && (!cachedEnemySprite.isActiveAndEnabled || cachedEnemySprite.color.a < 0.05f))
            {
                Logger.Log("Found invisible enemy, making invis!");
                fieryParticleRenderer.material.color = Color.clear;
                visible = false;
            }
            else if (!visible && (cachedEnemySprite.isActiveAndEnabled || cachedEnemySprite.color.a >= 0.05f))
            {
                Logger.Log("Enemy now visible!");
                fieryParticleRenderer.material.color = flameColor;
                visible = true;
            }
        }
コード例 #3
0
        private IEnumerator blankVideo()
        {
            if (!v.isPlaying)
            {
                while (!v.isPlaying)
                {
                    yield return(null);
                }
            }

            while (v.isPlaying)
            {
                yield return(null);
            }
            // Code to trigger credits goes here
            Logger.Log("Switching to end credits scene.");
            GameManager._instance.LoadScene("End_Credits");
            //Destroy(gameObject);
        }
コード例 #4
0
        private IEnumerator Start()
        {
            Logger.Log("[Daughter of Hallownest] Added HornetFinder MonoBehaviour");
            USceneManager.activeSceneChanged += SceneChanged;

            yield return(new WaitWhile(() => !HeroController.instance));

            DoH.grubLPref = HeroController.instance.grubberFlyBeamPrefabL_fury;
            DoH.grubRPref = HeroController.instance.grubberFlyBeamPrefabR_fury;

            Destroy(DoH.preloadedGO["mantis"].LocateMyFSM("Control"));

            DoH.preloadedGO["orb"] = DoH.preloadedGO["rad"].LocateMyFSM("Attack Commands").GetAction <SpawnObjectFromGlobalPool>("Spawn Fireball", 1).gameObject.Value;
            Destroy(_orb.LocateMyFSM("Orb Control"));

            var dungo = DoH.preloadedGO["bee"].LocateMyFSM("Control");

            dungo.ChangeTransition("Init", "FINISHED", "Swarm Start");
            dungo.ChangeTransition("Swarm", "END", "Swarm");
            dungo.ChangeTransition("Swarm", "SPELL", "Swarm");

            DoH.preloadedGO["bat"] = DoH.preloadedGO["grimm"].LocateMyFSM("Control").GetAction <SpawnObjectFromGlobalPool>("Firebat 1", 2).gameObject.Value;
            var dungo2 = DoH.preloadedGO["bat"].LocateMyFSM("Control");

            dungo2.ChangeTransition("Init", "HIGH", "Fire");
            dungo2.ChangeTransition("Init", "MID", "Fire");
            dungo2.ChangeTransition("Fire", "DISSIPATE", "Fire");
            dungo2.ChangeTransition("Fire", "END", "Fire");
            dungo2.ChangeTransition("Fire", "ORBIT SHIELD", "Fire");

            _mantis = DoH.preloadedGO["mantis"];
            _orb    = DoH.preloadedGO["orb"];
            _bee    = DoH.preloadedGO["bee"];
            _focus  = DoH.preloadedGO["blast"];
            _bat    = DoH.preloadedGO["bat"];
        }
コード例 #5
0
ファイル: DialogueNPC.cs プロジェクト: RedFrog6002/FrogCore
 public void Log(object o)
 {
     Logger.Log($"[{GetType().FullName.Replace(".", "]:[")}] - {o}");
 }
コード例 #6
0
 private static void log(string str)
 {
     Logger.Log("[Redwing] " + str);
 }
コード例 #7
0
 private void Log(object message)
 {
     Logger.Log($"[{GetType().FullName?.Replace(".", "]:[")}] - {message}");
 }
コード例 #8
0
 private void Log(object ob)
 {
     Logger.Log("[Parryable] " + ob);
 }
コード例 #9
0
 public static void Log(object o)
 {
     Logger.Log("[EffectFixer] " + o);
 }
コード例 #10
0
        private void Update()
        {
            //Silly hack to get three waves of radial nails instead of two
            //This is a dumb way to do this but I don't care
            if (_attackCommands.FsmVariables.GetFsmBool("Repeated").Value)
            {
                switch (CWRepeats)
                {
                case 0:
                    CWRepeats = 1;
                    _attackCommands.FsmVariables.GetFsmBool("Repeated").Value = false;
                    break;

                case 1:
                    CWRepeats = 2;
                    break;
                }
            }
            else if (CWRepeats == 2)
            {
                CWRepeats = 0;
            }

            //Force beam sweepers to always go in opposing directions. There were some special cases where they wouldn't that I was too lazy to investigate
            if (_beamsweepercontrol.ActiveStateName == _beamsweeper2control.ActiveStateName)
            {
                switch (_beamsweepercontrol.ActiveStateName)
                {
                case "Beam Sweep L":
                    _beamsweeper2control.ChangeState(GetFsmEventByName(_beamsweeper2control, "BEAM SWEEP R"));
                    break;

                case "Beam Sweep R":
                    _beamsweeper2control.ChangeState(GetFsmEventByName(_beamsweeper2control, "BEAM SWEEP L"));
                    break;
                }
            }

            if (_hm.hp < _phaseControl.FsmVariables.GetFsmInt("P2 Spike Waves").Value - fullSpikesHealth && !fullSpikesSet) //NEW PHASE
            {
                fullSpikesSet = true;

                //Spikes cover the whole arena!
                for (int i = 0; i < 5; i++)
                {
                    _spikeMasterControl.GetAction <SendEventByName>("Spikes Left", i).sendEvent  = "UP";
                    _spikeMasterControl.GetAction <SendEventByName>("Spikes Right", i).sendEvent = "UP";
                    _spikeMasterControl.GetAction <SendEventByName>("Wave L", i + 2).sendEvent   = "UP";
                    _spikeMasterControl.GetAction <SendEventByName>("Wave R", i + 2).sendEvent   = "UP";
                }
                _spikeMasterControl.GetAction <WaitRandom>("Wave L", 7).timeMin = 0.1f;
                _spikeMasterControl.GetAction <WaitRandom>("Wave L", 7).timeMax = 0.1f;
                _spikeMasterControl.GetAction <WaitRandom>("Wave R", 7).timeMin = 0.1f;
                _spikeMasterControl.GetAction <WaitRandom>("Wave R", 7).timeMax = 0.1f;

                _spikeMasterControl.SetState("Spike Waves");

                //Prevent ddark cheese; if you try to dive onto spikes you take damage
                StartCoroutine(AddDivePunishment());

                //More generous orbs
                _attackCommands.GetAction <Wait>("Orb Summon", 2).time           = 1.5f;
                _attackCommands.GetAction <SetIntValue>("Orb Antic", 1).intValue = 2;
                _attackCommands.GetAction <RandomInt>("Orb Antic", 2).min        = 1;
                _attackCommands.GetAction <RandomInt>("Orb Antic", 2).max        = 3;

                //Slower radial bursts
                _attackCommands.GetAction <AudioPlayerOneShotSingle>("EB 1", 2).delay = .75f;
                _attackCommands.GetAction <SendEventByName>("EB 1", 3).delay          = .75f;
                _attackCommands.GetAction <SendEventByName>("EB 1", 8).delay          = .75f;
                _attackCommands.GetAction <SendEventByName>("EB 1", 9).delay          = .85f;
                _attackCommands.GetAction <Wait>("EB 1", 10).time = 1.92f;

                _attackCommands.GetAction <AudioPlayerOneShotSingle>("EB 2", 3).delay = .75f;
                _attackCommands.GetAction <SendEventByName>("EB 2", 4).delay          = .75f;
                _attackCommands.GetAction <SendEventByName>("EB 2", 8).delay          = .75f;
                _attackCommands.GetAction <SendEventByName>("EB 2", 9).delay          = .85f;
                _attackCommands.GetAction <Wait>("EB 2", 10).time = 1.2f;

                _attackCommands.GetAction <AudioPlayerOneShotSingle>("EB 3", 3).delay = .75f;
                _attackCommands.GetAction <SendEventByName>("EB 3", 4).delay          = .75f;
                _attackCommands.GetAction <SendEventByName>("EB 3", 8).delay          = .75f;
                _attackCommands.GetAction <SendEventByName>("EB 3", 9).delay          = .85f;
                _attackCommands.GetAction <Wait>("EB 3", 10).time = 1.2f;

                //Nail sweeps are disabled, too bullshit with spikes everywhere
                _attackChoices.ChangeTransition("A1 Choice", "NAIL L SWEEP", "Beam Sweep L");
                _attackChoices.ChangeTransition("A1 Choice", "NAIL R SWEEP", "Beam Sweep L");
                _attackChoices.ChangeTransition("A1 Choice", "NAIL FAN", "Eye Beam Wait");
                _attackChoices.ChangeTransition("A1 Choice", "NAIL TOP SWEEP", "Orb Wait");
            }

            if (_hm.hp < _phaseControl.FsmVariables.GetFsmInt("P3 A1 Rage").Value + 30 && !disableBeamSet)
            {
                disableBeamSet = true;

                //Disable beam sweeps when nail rain/rage phase is about to start, so the player isn't forced to ddark
                _attackChoices.ChangeTransition("A1 Choice", "BEAM SWEEP L", "Orb Wait");
                _attackChoices.ChangeTransition("A1 Choice", "BEAM SWEEP R", "Eye Beam Wait");
            }

            if ((_attackChoices.FsmVariables.GetFsmInt("Arena").Value == 2) && !arena2Set) //Platform phase!
            {
                Logger.Log("[Ultimatum Radiance] Starting Phase 2");
                arena2Set = true;

                _spellControl.RemoveAction("Q2 Land", 0);                             //Revert ddark to normal behavior

                _attackCommands.GetAction <SetIntValue>("Orb Antic", 1).intValue = 6; //Reset orbs
                _attackCommands.GetAction <RandomInt>("Orb Antic", 2).min        = 5;
                _attackCommands.GetAction <RandomInt>("Orb Antic", 2).max        = 7;
                _attackCommands.GetAction <Wait>("Orb Summon", 2).time           = 0.60f;

                //Beam sweepers cover a larger area

                /*Normally the FSM handles this, but I'm modifying the numbers through code instead
                 * because the L2/R2 states don't have the events I need to get opposing beams working */
                _beamsweepercontrol.GetAction <SetPosition>("Beam Sweep L", 3).x        = 89;
                _beamsweepercontrol.GetAction <iTweenMoveBy>("Beam Sweep L", 5).vector  = new Vector3(-50, 0, 0);
                _beamsweepercontrol.GetAction <iTweenMoveBy>("Beam Sweep L", 5).time    = 5;
                _beamsweepercontrol.GetAction <SetPosition>("Beam Sweep R", 4).x        = 32.6f;
                _beamsweepercontrol.GetAction <iTweenMoveBy>("Beam Sweep R", 6).vector  = new Vector3(50, 0, 0);
                _beamsweepercontrol.GetAction <iTweenMoveBy>("Beam Sweep R", 6).time    = 5;
                _beamsweeper2control.GetAction <SetPosition>("Beam Sweep L", 2).x       = 89;
                _beamsweeper2control.GetAction <iTweenMoveBy>("Beam Sweep L", 4).vector = new Vector3(-50, 0, 0);
                _beamsweeper2control.GetAction <iTweenMoveBy>("Beam Sweep L", 4).time   = 5;
                _beamsweeper2control.GetAction <SetPosition>("Beam Sweep R", 3).x       = 32.6f;
                _beamsweeper2control.GetAction <iTweenMoveBy>("Beam Sweep R", 5).vector = new Vector3(50, 0, 0);
                _beamsweeper2control.GetAction <iTweenMoveBy>("Beam Sweep R", 5).time   = 5;
            }

            if (gameObject.transform.position.y >= 150f) //Indicates the final phase has started
            {
                if (_hm.hp < _phaseControl.FsmVariables.GetFsmInt("P5 Acend").Value - onePlatHealth)
                {
                    //When the player deals some damage, remove the right platform
                    GameObject.Find("Radiant Plat Small (10)").LocateMyFSM("radiant_plat").ChangeState(GetFsmEventByName(GameObject.Find("Radiant Plat Small (10)").LocateMyFSM("radiant_plat"), "SLOW VANISH"));
                    if (!onePlatSet)
                    {
                        onePlatSet = true;
                        Log("Removing upper right platform");
                        _attackCommands.GetAction <Wait>("Orb Summon", 2).time = 0.80f;
                    }
                }
                if (_hm.hp < _phaseControl.FsmVariables.GetFsmInt("P5 Acend").Value - onePlatHealth - platSpikesHealth)
                {
                    //When the player deals some more damage, spikes on the left platform go up
                    foreach (GameObject spike in _spikes)
                    {
                        spike.LocateMyFSM("Control").SendEvent("UP");
                    }

                    if (!platSpikesSet)
                    {
                        platSpikesSet = true;
                        GameObject.Find("Radiant Plat Small (10)").LocateMyFSM("radiant_plat").ChangeState(GetFsmEventByName(GameObject.Find("Radiant Plat Small (10)").LocateMyFSM("radiant_plat"), "SLOW VANISH"));
                        StartCoroutine(AddDivePunishment()); //Dive cheese prevention here too
                    }
                }
            }
        }
コード例 #11
0
 private void Start()
 {
     Logger.Log("[Ultimatum Radiance] Added AbsFinder MonoBehaviour");
 }
コード例 #12
0
 public static void Log(object o)
 {
     Logger.Log("[Lost Arena] " + o);
 }
コード例 #13
0
 public static void log(string str)
 {
     Logger.Log("[Infinite Grimm] " + str);
 }
コード例 #14
0
 private void Log(object o)
 {
     Logger.Log("[Fennel Moves] " + o);
 }
コード例 #15
0
 public static void Log(object message) => Logger.Log("[Tamer]" + message);
コード例 #16
0
 public static void Log(object o)
 {
     Logger.Log($"[{Assembly.GetExecutingAssembly().GetName().Name}]: " + o);
 }
コード例 #17
0
ファイル: StartTiso.cs プロジェクト: jngo102/Tiso
 public static void Log(object message) => Logger.Log("[Start Tiso]" + message);
コード例 #18
0
 private static void Log(object obj)
 {
     Logger.Log("[Ultimatum Radiance] " + obj);
 }
コード例 #19
0
 private void Log(String message)
 {
     Logger.Log($"[{this.GetType().FullName.Replace(".", "]:[")}] - {message}");
 }
コード例 #20
0
 public static void Log(object o)
 {
     Logger.Log("[Zombie] " + o);
 }
コード例 #21
0
 private void Log(System.Object message)
 {
     Logger.Log($"[{this.GetType().FullName.Replace(".", "]:[")}] - {message.ToString()}");
 }
コード例 #22
0
 public static void Log(object o)
 {
     Logger.Log("[Shade Finder] " + o);
 }
コード例 #23
0
 public static void Log(object o)
 {
     Logger.Log("[Music] " + o);
 }
コード例 #24
0
 private void Log(string message)
 {
     Logger.Log($"[ToT][Audio] - {message}");
 }
コード例 #25
0
 // Update is called once per frame
 private void Log(object o)
 {
     Logger.Log("[Ship Control] " + o);
 }
コード例 #26
0
 private static void Log(string str)
 {
     Logger.Log("[FSM UTIL]: " + str);
 }
コード例 #27
0
 private static void Log(object obj)
 {
     Logger.Log("[Death] " + obj);
 }
コード例 #28
0
 private void Log(object o)
 {
     Logger.Log("[Show] " + o);
 }
コード例 #29
0
 public static void Log(object o)
 {
     Logger.Log("[Pain Finder] " + o);
 }