예제 #1
0
파일: EnemyView.cs 프로젝트: parumyon/TUT
    // Start is called before the first frame update
    void Start()
    {
        startbutton       = GameObject.Find("Gamemain").GetComponent <Startbutton>();
        RakusekiIwa       = GameObject.Find("rakuseki_iwa");
        RakusekiIwaScript = RakusekiIwa.GetComponent <RakusekiIwa>();

        BossAttack = GameObject.Find("Boss_walking_R").GetComponent <Animator>();
    }
예제 #2
0
파일: yuusyaAI.cs 프로젝트: parumyon/TUT
    // private Animator Anim;
    // Start is called before the first frame update
    void Start()
    {
        rb2          = GetComponent <Rigidbody2D>();
        Speedtyousei = 3;

        startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
        YuushaAnim  = GameObject.Find("Hero_running").GetComponent <Animator>();
    }
예제 #3
0
파일: Togenoyuka.cs 프로젝트: parumyon/TUT
    // Start is called before the first frame update
    void Start()
    {
        YuusyaAI = GameObject.Find("yuusya").GetComponent <yuusyaAI>();
        enemyAI  = GameObject.Find("boss").GetComponent <EnemyAI>();

        FarstDame  = true;
        SecondDame = true;
        ThirdDame  = true;
        FourthDame = true;


        startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
    }
예제 #4
0
    //private SNAP snap;
    // Start is called before the first frame update
    void Start()
    {
        YuusyaAI       = GameObject.Find("yuusya").GetComponent <yuusyaAI>();
        enemyAI        = GameObject.Find("boss").GetComponent <EnemyAI>();
        holding        = GetComponentInParent <SNAP>();
        TorabasamiAnim = GameObject.Find("Trap_Torabasami_Animation_1").GetComponent <Animator>();

        //FarstDame = true;
        //SecondDame = true;
        parent = transform.parent.gameObject;

        startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
        //snap = GameObject.Find("torabasami").GetComponent<SNAP>();
    }
예제 #5
0
파일: EnemyAI.cs 프로젝트: parumyon/TUT
    // Start is called before the first frame update
    void Start()
    {
        MOVE      = 1;
        myAnim    = GetComponent <Animator>();
        ClearAnim = GameObject.Find("Image").GetComponent <Animator>();


        sprite  = GetComponent <SpriteRenderer>();
        this.HP = maxHP;
        if (sliderHP != null)
        {
            sliderHP.value = 1.0f;
        }

        startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();

        RakusekiIwa       = GameObject.Find("rakuseki_iwa");
        RakusekiIwaScript = RakusekiIwa.GetComponent <RakusekiIwa>();

        BossWalk = GameObject.Find("Boss_walking_R").GetComponent <Animator>();
    }
예제 #6
0
파일: Destroy.cs 프로젝트: parumyon/TUT
 void Start()
 {
     startbutton = GameObject.Find("Gamemain").GetComponent<Startbutton>();
 }
예제 #7
0
파일: y_otori_L.cs 프로젝트: parumyon/TUT
 // Start is called before the first frame update
 void Start()
 {
     YuusyaAI    = GameObject.Find("yuusya").GetComponent <yuusyaAI>();
     startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
     holding     = GetComponentInParent <SNAP>();
 }
예제 #8
0
파일: Block.cs 프로젝트: parumyon/TUT
 // Start is called before the first frame update
 void Start()
 {
     startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
     holding     = GetComponentInParent <block_hold>();
     box         = GetComponent <BoxCollider2D>();
 }
예제 #9
0
    // Start is called before the first frame update
    void Start()
    {
        costSlider        = GameObject.Find("costSlider");
        sliderScript      = costSlider.GetComponent <costSlider>();
        startbuttonScript = this.GetComponent <Startbutton>();

        cost = sliderScript.maxCost;

        var pos = transform.position;

        if (buttonAsiba != null)
        {
            buttonAsiba.onClick.AddListener(delegate
            {
                if (cost >= asibaCost)
                {
                    var newAsiba = Instantiate(AsibaPrefab);
                    newAsiba.transform.position = new Vector3(-10.2f, -6.5f, 0);

                    var physic = newAsiba.GetComponent <Rigidbody>();

                    cost -= asibaCost;
                }
            });
        }
        if (buttonJump != null)
        {
            buttonJump.onClick.AddListener(delegate
            {
                if (cost >= jumpCost)
                {
                    var newJump = Instantiate(JumpPrefab);
                    newJump.transform.position = new Vector3(-7, -6.5f, 0);

                    var physic = newJump.GetComponent <Rigidbody>();

                    cost -= jumpCost;
                }
            });
        }
        if (buttonTorabasami != null)
        {
            buttonTorabasami.onClick.AddListener(delegate
            {
                if (cost >= TorabasamiCost)
                {
                    var newTorabasami = Instantiate(TorabasamiPrefab);
                    newTorabasami.transform.position = new Vector3(-3.5f, -6.5f, 0);

                    var physic = newTorabasami.GetComponent <Rigidbody>();

                    cost -= TorabasamiCost;
                }
            });
        }

        if (buttonY_otori != null)
        {
            buttonY_otori.onClick.AddListener(delegate
            {
                if (cost >= Y_otoriCost)
                {
                    var newY_otori = Instantiate(Y_otoriPrefab);
                    newY_otori.transform.position = new Vector3(3.5f, -6.5f, 0);

                    var physic = newY_otori.GetComponent <Rigidbody>();

                    cost -= Y_otoriCost;
                }
            });
        }
        if (buttonB_otori != null)
        {
            buttonB_otori.onClick.AddListener(delegate
            {
                if (cost >= B_otoriCost)
                {
                    var newB_otori = Instantiate(B_otoriPrefab);
                    newB_otori.transform.position = new Vector3(0, -6.5f, 0);

                    var physic = newB_otori.GetComponent <Rigidbody>();

                    cost -= B_otoriCost;
                }
            });
        }

        if (buttonToge != null)
        {
            buttonToge.onClick.AddListener(delegate
            {
                if (cost >= TogeCost)
                {
                    var newToge = Instantiate(TogePrefab);
                    newToge.transform.position = new Vector3(7, -6.5f, 0);

                    var physic = newToge.GetComponent <Rigidbody>();

                    cost -= TogeCost;
                }
            });
        }

        if (buttonIwa != null)
        {
            buttonIwa.onClick.AddListener(delegate
            {
                if (cost >= IwaCost)
                {
                    var newIwa                   = Instantiate(IwaPrefab);
                    var newSwitch                = Instantiate(switchPrefab);
                    newIwa.transform.position    = new Vector3(10.5f, -6.5f, 0);
                    newSwitch.transform.position = new Vector3(12.1f, -6.5f, 0);



                    cost -= IwaCost;
                }
            });
        }
    }
예제 #10
0
 void Start()
 {
     startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
     enemyAI     = GameObject.Find("boss").GetComponent <EnemyAI>();
 }
예제 #11
0
 // Start is called before the first frame update
 void Start()
 {
     rig2        = GameObject.Find("yuusya").GetComponent <Rigidbody2D>();
     startbutton = GameObject.Find("Gamemain").GetComponent <Startbutton>();
     holding     = GetComponentInParent <SNAP>();
 }