protected override void Start()
        {
            base.Start();

            LifeTimer = new LifeTimer(LifeTime);
            Movement = new BaseMovement(MaxSpeed);
            rigidbody.AddForce(Direction * Movement.CurrentSpeed, ForceMode.VelocityChange);
        }
Exemple #2
0
        protected override void Start()
        {
            base.Start();

            Damage   = CurrentDamage;
            Mana     = ManaCount;
            lifeTime = new LifeTimer(LifeTime);
        }
        protected override void Start()
        {
            base.Start();

            Damage = CurrentDamage;
            Mana = ManaCount;
            lifeTime = new LifeTimer(LifeTime);
        }
Exemple #4
0
 public void StopGrowing()
 {
     LifeTimer.Stop();
     foreach (IGrowableGraphicChild child in panelNature.Controls)
     {
         child.StopGrowing();
     }
 }
Exemple #5
0
        protected override void Start()
        {
            base.Start();

            LifeTimer = new LifeTimer(LifeTime);
            Movement  = new BaseMovement(MaxSpeed);
            rigidbody.AddForce(Direction * Movement.CurrentSpeed, ForceMode.VelocityChange);
        }
    public override void StateStart()
    {
        Text = Instantiate(Text)as GameObject;

        Player = GameObject.FindGameObjectWithTag("Player");
        Player.SendMessage("Freeze",SendMessageOptions.DontRequireReceiver);

        lifeTimer = GameObject.FindGameObjectWithTag("LifeTimer").GetComponent<LifeTimer>();
    }
 private void instantiateHelperClasses()
 {
     this.playerValues = new PlayerValues();
     this.instantiateRoadManager();
     this.topShoulder                        = new Shoulder(this.player.Width);
     this.animationManager                   = new AnimationManager();
     this.collisionDetector                  = new CollisionDetector();
     this.lifeTimer                          = new LifeTimer();
     this.playerMovementManager              = new PlayerMovementManager(this.player, this.FrogHomes);
     this.playerMovementManager.PlayerMoved += this.playerMoved;
 }
Exemple #8
0
    /// +++ MEMBERS +++ ///

    /// +++ FUNCTIONS +++ ///

    public static void CreateMichaelBayEffect(Mesh mesh, Transform t, Color meshColor, bool timestretch = true)
    {
        GameObject michael = new GameObject("michael" + count++);

        //GameObject blackHole = new GameObject("blackhole" + count++);
        michael.transform.position   = t.position;
        michael.transform.rotation   = t.rotation;
        michael.transform.localScale = t.localScale;
        //blackHole.transform.position = t.position;
        //blackHole.transform.rotation = t.rotation;

        if (mesh != null)
        {
            GeometryExplosion exp = michael.AddComponent <GeometryExplosion>();
            exp.Mesh           = mesh;
            exp.ExplosionColor = meshColor;
            exp.ExplosionSpeed = 8;
            exp.ShrinkSpeed    = 1.0f;
            exp.ShrinkTime     = 0.25f;
        }

        if (timestretch)
        {
            TimerStretch timeStrech = michael.AddComponent <TimerStretch>();
            timeStrech.TimePrePhase    = 0.5f;
            timeStrech.TimeMainPhase   = 0.2f;
            timeStrech.TimePostPhase   = 0.5f;
            timeStrech.TargetTimeScale = 0.1f;
        }

        LifeTimer michaelLifetimer = michael.AddComponent <LifeTimer>();

        michaelLifetimer.LifeTime = 4.0f;

        //GPUParticleAttractor attractor = blackHole.AddComponent<GPUParticleAttractor>();
        //attractor.Power = 250.0f;
        //LifeTimer blackHoleLifetimer = blackHole.AddComponent<LifeTimer>();
        //blackHoleLifetimer.LifeTime = 0.2f;

        AudioSource ceramicSound = michael.AddComponent <AudioSource>();

        ceramicSound.clip         = Resources.Load <AudioClip>("Samples/Explosion/Ceramic");
        ceramicSound.time         = 0.2f;
        ceramicSound.spatialBlend = 1.0f;
        ceramicSound.Play();

        AudioSource artillerySound = michael.AddComponent <AudioSource>();

        artillerySound.clip         = Resources.Load <AudioClip>("Samples/Explosion/Artillery");
        artillerySound.time         = 0.25f;
        artillerySound.spatialBlend = 1.0f;
        artillerySound.Play();
    }
Exemple #9
0
 public void Revive()
 {
     IsDead = false;
     LifeTimer.Start();
     for (int i = 0; i < panelNature.Controls.Count; i++)
     {
         if (panelNature.Controls[i] is Leaf)
         {
             ((Leaf)panelNature.Controls[i]).Revive();
         }
     }
 }
Exemple #10
0
 public new void Show()
 {
     if (Visible)
     {
         Reincarnation();
         return;
     }
     //if (!Visible)
     //    Reincarnation();
     TipText.Text = _tip._Text;
     this.Height  = TipText.Height + 100;
     //this.Width = TipText.Width + 20;
     this.Location = new Point(Cursor.Position.X, Cursor.Position.Y + 20);
     base.Show();
     LifeTimer.Start();
 }
Exemple #11
0
    public override void StateStart()
    {
        lifeTimer = GameObject.FindGameObjectWithTag("LifeTimer").GetComponent<LifeTimer>();
        Siasaki = GameObject.FindGameObjectWithTag("Player").GetComponent<SiasakiChanController>();
        questFactory = GameObject.FindGameObjectWithTag("QuestFactory").GetComponent<QuestFactory>();
        yakubin = this.Siasaki.yakubin.GetComponent<Yakubin>();

        questFactory.InstantQuest();
        lifeTimer.isStop = false;

        //コールバック登録
        Siasaki.NomikomuCallback += NomikomiEvent;
        Siasaki.Nomikomu_to_Idle_Callback += Nomikomu_to_Idle_Event;
        Siasaki.CreateYakuCallback += CreateYakuEvent;
        Siasaki.Damage_to_Idle_Callback += Damage_to_Idle_Event;
        questFactory.DestroyQuestCallBack += QuestTimeUpEvent;
    }
        protected override void Update()
        {
            base.Update();

            if (!Health.IsAlive)
            {
                if (deathTime == null)
                {
                    deathTime = new LifeTimer(DeathTime);
                    animator.SetTrigger("Death");
                    rigidbody.isKinematic = true;
                    var box = this.gameObject.GetComponent<BoxCollider>();
                    box.isTrigger = true;
                }
                else if (!deathTime.isAlive)
                    Destroy(this.gameObject);
            }
        }
Exemple #13
0
        protected override void Update()
        {
            base.Update();

            if (!Health.IsAlive)
            {
                if (deathTime == null)
                {
                    deathTime = new LifeTimer(DeathTime);
                    animator.SetTrigger("Death");
                    rigidbody.isKinematic = true;
                    var box = this.gameObject.GetComponent <BoxCollider>();
                    box.isTrigger = true;
                }
                else if (!deathTime.isAlive)
                {
                    Destroy(this.gameObject);
                }
            }
        }
Exemple #14
0
 public void LifeForm()
 {
     LifeTimer.Interval = 600;
     LifeTimer.Tick    += new EventHandler((object sender, EventArgs e) => { InviseForm(); LifeTimer.Stop(); });
     LifeTimer.Start();
 }
Exemple #15
0
 public void RestartTimer()
 {
     _lifeTimer            = new LifeTimer();
     LifeTimer.TimePassed += Update;
     LifeTimer.TimePassed += Notify;
 }