コード例 #1
0
 void Start()
 {
     uC_MissionUiScript = uC_MissionUiObject.GetComponent <UltimateComboUiScript>();
     comboTaker         = GetComponent <ComboTaker>();
     m = false;
     p = false;
 }
コード例 #2
0
 // Update is called once per frame
 void Update()
 {
     if (action)
     {
         if (direction && !PlayerMovement.playerWasHit)
         {
             if (loadingBar.localScale.y < 1)
             {
                 loadingBar.localScale = new Vector3(1.14f, loadingBar.localScale.y + (speed * Time.deltaTime), 1);
             }
             else
             {
                 action = false;
                 ComboTaker cT = GameObject.Find("BubbleGenerator").GetComponent <ComboTaker>();
                 boss.ChangeBossHP();
                 cT.SafeBigInfoGeneration("Boss HP " + boss.hp + "/3   score +5%");
                 cT.score.AddPercentToScore(5);
                 Destroy(gameObject, 1);
             }
         }
         else
         {
             if (loadingBar.localScale.y > 0)
             {
                 loadingBar.localScale = new Vector3(1.14f, loadingBar.localScale.y - (speed * 1.6f * Time.deltaTime), 1);
             }
         }
     }
 }
コード例 #3
0
 public void CallPlayerCollision()
 {
     //workOnlyOnce = false;
     disap     = true;
     start     = Color.white;
     end       = Color.clear;
     sr        = GetComponent <SpriteRenderer>();
     trans     = GetComponent <Transform>();
     timer     = 0;
     moveIndex = GetComponentInParent <ComboTaker>();
     moveIndex.NormalEngage(bubbleIndex);
 }
コード例 #4
0
    // Update is called once per frame
    void Update()
    {
        if (action)
        {
            if (direction && !PlayerMovement.playerWasHit)
            {
                if (loadingBar.localScale.y < 1)
                {
                    loadingBar.localScale = new Vector3(1, loadingBar.localScale.y + (speed * Time.deltaTime), 1);
                }
                else
                {
                    action = false;
                    ComboTaker cT = GetComponentInParent <Spawning>().cT;


                    if (GameObject.Find("Player").GetComponent <PlayerHPSystem>().AddSuperShield() == 1)
                    {
                        cT.infoGenerator.MakeInfoObject("ExtraShield");
                    }
                    else
                    {
                        cT.infoGenerator.MakeInfoObject("score +5%");
                        cT.score.AddPercentToScore(5);
                    }
                    Destroy(gameObject, 1);
                }
            }
            else
            {
                if (loadingBar.localScale.y > 0)
                {
                    loadingBar.localScale = new Vector3(1, loadingBar.localScale.y - (speed * 1.6f * Time.deltaTime), 1);
                }
            }
        }
    }