示例#1
0
    void Start()
    {
        //오브젝트 받아오기
        rb = GetComponent <Rigidbody2D>();
        bottleGenerator          = GameObject.Find("BottleManager").GetComponent <BottleGenerator>();
        player                   = GameObject.Find("Player");
        bottleSelectController   = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        playerImageController    = player.GetComponent <PlayerImageController>();
        padStrength              = GameObject.Find("Pad_Strength").GetComponent <PadStrength>();
        padDirection             = GameObject.Find("Joystick").GetComponent <PadDirection>();
        trajectoryLine           = GameObject.Find("Trajectory").GetComponent <TrajectoryLine>();
        transparent              = GetComponent <SpriteRenderer>(); // 물병의 스프라이트 렌더러(투명도)
        tensionGaugeManager      = GameObject.Find("Image_TensionGaugeBar").GetComponent <TensionGaugeManager>();
        controllButtonsUIManager = GameObject.Find("UIManager").GetComponent <ControllButtonsUIManager>();
        usefullOperation         = GameObject.Find("GameResource").GetComponent <UsefullOperation>();
        screenEffectController   = GameObject.Find("Main Camera").GetComponent <ScreenEffectController>();;


        //값 초기화
        rb.gravityScale      = 0;
        transform.position   = playerImageController.getBottlePosition();
        isSuperPowerAvailabe = false; //물병에 초능력을 적용할 수 있는지의 여부
        isStanding           = false;
        onFloor             = false;
        standingBySkill     = false;
        rotateSpeed         = 0.8f; //회전속도
        delta               = 0;
        destroyDelay        = 1;
        standingDelay       = 2;
        padStrengthTouched  = false;
        padDirectionTouched = false;
        tensionGaugeUp      = true;
        isDestroying        = false;
        standBottle         = false;
    }
示例#2
0
 // Start is called before the first frame update
 void Start()
 {
     playerImageController  = GameObject.Find("Player").GetComponent <PlayerImageController>();
     padStrength            = GameObject.Find("Pad_Strength").GetComponent <PadStrength>();
     padDirection           = GameObject.Find("Joystick").GetComponent <PadDirection>();
     skillButton            = GameObject.Find("Button_Skill").GetComponent <SkillButton>();
     bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
 }
示例#3
0
    // Start is called before the first frame update
    void Start()
    {
        bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        screenEffectController = GameObject.Find("Main Camera").GetComponent <ScreenEffectController>();
        usefullOperation       = GameObject.Find("GameResource").GetComponent <UsefullOperation>();
        bottles = GameObject.Find("Bottles");

        freezeAvailable = true;
    }
示例#4
0
 private void Start()
 {
     bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
     psychokinesis          = GameObject.Find("Player").GetComponent <Psychokinesis>();
     membraneCreator        = GameObject.Find("Player").GetComponent <MembraneCreator>();
     freezer = GameObject.Find("Player").GetComponent <Freezer>();
     playerImageController = GameObject.Find("Player").GetComponent <PlayerImageController>();
     panel_SuperPower      = GameObject.Find("Panel_SuperPower").GetComponent <SuperPowerPanelController>();
 }
示例#5
0
 void Start()
 {
     strengthGauge          = GameObject.Find("StrengthGauge");
     bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
     mainCamera             = Camera.main.gameObject.GetComponent <CameraMovement>();
     colorCamera            = GameObject.Find("Color Camera").GetComponent <CameraMovement>();
     totalStrength          = 0;
     count = 0;
 }
示例#6
0
    void Start()
    {
        bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        playerImageController  = GameObject.Find("Player").GetComponent <PlayerImageController>();
        membraneCreator        = GameObject.Find("Player").GetComponent <MembraneCreator>();

        isTouch = false;
        initPos = Vector2.zero;
        endPos  = Vector2.zero;
    }
示例#7
0
    // Start is called before the first frame update
    void Start()
    {
        bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        panel_SuperPower       = GameObject.Find("Panel_SuperPower").GetComponent <SuperPowerPanelController>();
        screenEffectController = GameObject.Find("Main Camera").GetComponent <ScreenEffectController>();
        resourceManager        = GameObject.Find("GameResource").GetComponent <ResourceManager>();

        superPowerLV      = resourceManager.GetSuperPowerLV(1);
        membraneAvailable = false;
        membraneNum       = superPowerLV; //탄성막 생성자의 초능력 강화 레벨의 수치만큼 탄성막을 생성할 수 있다.
    }
示例#8
0
    }                                         //염력을 사용 가능한 지의 여부



    void Start()
    {
        bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        panel_SuperPower       = GameObject.Find("Panel_SuperPower").GetComponent <SuperPowerPanelController>();
        screenEffectController = GameObject.Find("Main Camera").GetComponent <ScreenEffectController>();
        gameResourceValue      = GameObject.Find("GameResource").GetComponent <ResourceManager>();
        bottles = GameObject.Find("Bottles");

        superPowerLV    = gameResourceValue.GetSuperPowerLV(0);
        psychoAvailable = true;
    }
示例#9
0
 void Start()
 {
     bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
     bottleGenerator        = GameObject.Find("BottleManager").GetComponent <BottleGenerator>();
     padStrength            = GameObject.Find("Pad_Strength").GetComponent <PadStrength>();
     bottleController       = GameObject.FindWithTag("isActBottle").GetComponent <BottleController>(); //NEW: 처음에 시작할 때 태그로 찾아줘야 함
     thisBottleCollision    = gameObject.GetComponent <BottleCollision>();
     usefullOperation       = GameObject.Find("GameResource").GetComponent <UsefullOperation>();
     redAura                = transform.Find("RedAura").gameObject;
     freezeRange            = transform.Find("FreezeRange").gameObject;
     screenEffectController = GameObject.Find("Main Camera").GetComponent <ScreenEffectController>();
     psychokinesis          = GameObject.Find("Player").GetComponent <Psychokinesis>();
     bottleChain.Add(thisBottleCollision); //체인과 같이 연속적으로 이어진 물병들의 리스트에는 자신도 포함한다
 }
示例#10
0
    private Button subtractMembrane; //탄성막 제거 버튼

    private void Start()
    {
        membranes = GameObject.Find("Membranes");
        bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        resourceManager        = GameObject.Find("GameResource").GetComponent <ResourceManager>();
        usefullOperation       = GameObject.Find("GameResource").GetComponent <UsefullOperation>();
        addMembrane            = GameObject.Find("ControllButtons").transform.Find("Button_AddMembrane").GetComponent <Button>();
        subtractMembrane       = GameObject.Find("ControllButtons").transform.Find("Button_SubtractMembrane").GetComponent <Button>();

        addMembrane.onClick.AddListener(AddMembrane);
        subtractMembrane.onClick.AddListener(SubtractMembrane);

        skillLV = resourceManager.GetSkillLV(1);
    }
示例#11
0
    private Vector2 distance; //물병과 카메라 포지션 사이의 거리



    void Start()
    {
        membranes = GameObject.Find("Membranes");
        bottleSelectController    = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        superPowerPanelController = GameObject.Find("Panel_SuperPower").GetComponent <SuperPowerPanelController>();
        rect_background           = backgroud.GetComponent <RectTransform>();
        screenEffectController    = Camera.main.transform.GetComponent <ScreenEffectController>();
        backgroundWidth           = rect_background.rect.width * rect_background.localScale.x;
        backgroundHeight          = rect_background.rect.height * rect_background.localScale.y;
        presentCamera             = GetComponent <Camera>();
        defaultCameraSize         = presentCamera.orthographicSize;
        hold         = false;
        membraneHold = false;
        autoMoving   = false;
        SetCameraSize();
    }
示例#12
0
    }                                     //염력을 사용할 수 있는 시간

    void Start()
    {
        bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        playerImageController  = GameObject.Find("Player").GetComponent <PlayerImageController>();
        psychokinesis          = GameObject.Find("Player").GetComponent <Psychokinesis>();
        mainCamera             = Camera.main;
        colorCamera            = GameObject.Find("Color Camera").gameObject;
        blurEffect             = GameObject.Find("Main Camera").GetComponent <RadialBlurImageEffect>();
        shadowEffect           = GameObject.Find("Main Camera").GetComponent <ShadowThresholdCustomEffect>();
        Panel_SuperPower       = GameObject.Find("Panel_SuperPower").GetComponent <SuperPowerPanelController>();
        usefullOperation       = GameObject.Find("GameResource").GetComponent <UsefullOperation>();
        height          = 2 * Camera.main.orthographicSize;
        width           = height * Camera.main.aspect;
        blurTime        = 1;
        screenEffectNum = 1;
        psychoTime      = 0.4f;
    }
示例#13
0
    public Sprite[] skillButtonSprite; // skill버튼 스프라이트 배열

// Start is called before the first frame update
    void Start()
    {
        tensionGaugeBar          = GameObject.Find("Image_TensionGaugeBar");
        panel_SuperPower         = GameObject.Find("Panel_SuperPower");
        membranes                = GameObject.Find("Membranes");
        trajectory               = GameObject.Find("Trajectory");
        button                   = GetComponent <Button>();
        playerImageController    = GameObject.Find("Player").GetComponent <PlayerImageController>();
        bottleSelectController   = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        padStrength              = GameObject.Find("Pad_Strength").GetComponent <PadStrength>();
        padDirection             = GameObject.Find("Joystick").GetComponent <PadDirection>();
        tensionGaugeManager      = GameObject.Find("Image_TensionGaugeBar").GetComponent <TensionGaugeManager>();
        controllButtonsUIManager = GameObject.Find("UIManager").GetComponent <ControllButtonsUIManager>();
        psychokinesis            = GameObject.Find("Player").GetComponent <Psychokinesis>();
        freezer                  = GameObject.Find("Player").GetComponent <Freezer>();
        usingSkill               = false;
        skillUsed                = false;
    }
示例#14
0
    public void Start()
    {
        count     = GameObject.Find("Pad_Strength").GetComponent <PadStrength>().count;
        structure = transform.parent.GetComponent <Structure>();
        bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        bottles             = GameObject.Find("Bottles");
        padStrength         = GameObject.Find("Pad_Strength").GetComponent <PadStrength>();
        tensionGaugeManager = GameObject.Find("Image_TensionGaugeBar").GetComponent <TensionGaugeManager>();
        usefullOperation    = GameObject.Find("GameResource").GetComponent <UsefullOperation>();

        conditionFullfilled = false;
        shouldBeFreezed     = false;
        inCollidernNum      = 0;
        intervalTime        = 0;
        operatingTime       = 0;
        actBool             = true;
        enoughStackBool     = true;
    }
示例#15
0
    void Start()
    {
        playingChr    = 0;
        firstSlotChr  = 1;
        secondSlotChr = 2;

        spriteRenderer         = GetComponent <SpriteRenderer>();
        bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>();
        skillButton            = GameObject.Find("Button_Skill").GetComponent <SkillButton>();
        padStrength            = GameObject.Find("Pad_Strength").GetComponent <PadStrength>();
        padDirection           = GameObject.Find("Joystick").GetComponent <PadDirection>();
        charSlot1       = GameObject.Find("ControllButtons").transform.Find("Button_CharacterSlot_1").GetComponent <Image>();
        charSlot2       = GameObject.Find("ControllButtons").transform.Find("Button_CharacterSlot_2").GetComponent <Image>();
        characterSlot_1 = GameObject.Find("ControllButtons").transform.Find("Button_CharacterSlot_1").GetComponent <Button>();
        characterSlot_2 = GameObject.Find("ControllButtons").transform.Find("Button_CharacterSlot_2").GetComponent <Button>();

        characterSlot_1.onClick.AddListener(CharacterSlot1);
        characterSlot_2.onClick.AddListener(CharacterSlot2);


        spriteRenderer.sprite = standingSprites[playingChr];
        charSlot1.sprite      = iconSprites[firstSlotChr];
        charSlot2.sprite      = iconSprites[secondSlotChr];
    }
示例#16
0
    private BottleSelectController bottleSelectController; // 다른 스크립트에서 가져옴



    void Start()
    {
        freezer = GameObject.Find("Player").GetComponent <Freezer>();                                      //Freezer 스크립트를 참조하는 객체 생성
                                                                                                           //        bottle = GameObject.Find("BottleManager").GetComponent<BottleSelectController>(); //BottleSelectConroller를 참조하는 객체 생성
        bottleSelectController = GameObject.Find("BottleManager").GetComponent <BottleSelectController>(); //BottleSelectConroller를 참조하는 객체 생성
    }