Пример #1
0
    void Start()
    {
        Pop = false;

        BulletTransform = GetComponent <Transform>();
        BulletRigid2D   = GetComponent <Rigidbody2D>();
        BulletSprite    = GetComponent <SpriteRenderer>();

        PlayerScript = GameObject.Find("ctw_Player").GetComponent <ctw_Player_behavior>();

        Eraser1 = GameObject.Find("ctw_Eraser_Player").GetComponent <ctw_Eraser_behavior>();
        Eraser2 = GameObject.Find("ctw_Eraser_Boss").GetComponent <ctw_Eraser_behavior>();

        BulletTransform.localScale = new Vector2(1f / 3f, 0.5f / 3f);
    }
Пример #2
0
    void Start()
    {
        MaxHP  = 10000;
        HP     = 10000;
        LastHP = 10000;

        PlayerTransform = GameObject.Find("ctw_Player").GetComponent <Transform>();
        PlayerRigid2D   = GameObject.Find("ctw_Player").GetComponent <Rigidbody2D>();
        PlayerScript    = GameObject.Find("ctw_Player").GetComponent <ctw_Player_behavior>();

        CameraScript = GameObject.Find("ctw_Main Camera").GetComponent <ctw_Camera_behavior>();

        BossTransform = GetComponent <Transform>();
        BossSprite    = GetComponent <SpriteRenderer>();
        Eraser        = GameObject.Find("ctw_Eraser_Boss").GetComponent <ctw_Eraser_behavior>();

        Invoke("Timer_AttackCool", 1f);
    }
Пример #3
0
    void Control()
    {
        ctw_Player_behavior CallScript = GameObject.Find("ctw_Player").GetComponent <ctw_Player_behavior>();

        if ((PlayerTransform.position.y >= PlatformTransform.position.y + 0.49f) && (DownCool == 0))
        {
            PlatformCollider.isTrigger = false;

            if ((CallScript.DOWN == true) && (PlayerTransform.position.y - PlatformTransform.position.y <= 2f))
            {
                PlatformCollider.isTrigger = true;
                DownCool = 1;
                Invoke("Cooler", 0.5f);
            }
        }
        if ((PlayerTransform.position.y < PlatformTransform.position.y - 1f) && (DownCool == 0))
        {
            PlatformCollider.isTrigger = true;
        }
    }