Example #1
0
    [SerializeField] public Vector3 SpawnSlimePos; //スライムごとの位置

    // Start is called before the first frame update
    void Start()
    {
        GameObject SmallSlime = (GameObject)Resources.Load("Prefab/SmallSlime");

        //フィールドの中心軸(の位置)を取得
        Center = GameObject.Find("FieldCenter");

        //ステージマネージャーの取得
        StageManager = GameObject.Find("StageManager");
        //マネージャーが持っているmanagerスクリプト
        script = StageManager.GetComponent <manager>();

        //===================
        // 小スライムの生成
        //===================
        for (int i = 0; i < AppearSlimeCount; i++)
        {
            script.CreatePrefabAsChild
            (
                this.gameObject,
                SmallSlime,
                SpawnSlimePos,
                SmallSlime.tag
            );
        }
        targetObj = GameObject.Find("FieldCenter");
        targetPos = targetObj.transform.position;

        Manager = GameObject.Find("StageManager");

        BottunScriptL = GameObject.Find("ButtonL").GetComponent <Bottun>();
        BottunScriptR = GameObject.Find("ButtonR").GetComponent <Bottun>();
    }
Example #2
0
    // Start is called before the first frame update
    void Start()
    {
        targetObj = GameObject.Find("FieldCenter");
        targetPos = targetObj.transform.position;

        Manager = GameObject.Find("StageManager");
        script  = Manager.GetComponent <manager>();

        BottunScriptL = GameObject.Find("ButtonL").GetComponent <Bottun>();
        BottunScriptR = GameObject.Find("ButtonR").GetComponent <Bottun>();
    }
Example #3
0
    [SerializeField] public Vector3 SpawnSlimePos; //スライムごとの位置

    // Start is called before the first frame update
    void Start()
    {
        GameObject SmallSlime = (GameObject)Resources.Load("Prefab/SmallSlime");

        //フィールドの中心軸(の位置)を取得
        Center = GameObject.Find("FieldCenter");

        //ステージマネージャーの取得
        StageManager = GameObject.Find("StageManager");
        //マネージャーが持っているmanagerスクリプト
        script = StageManager.GetComponent <manager>();


        targetObj = GameObject.Find("FieldCenter");
        targetPos = targetObj.transform.position;

        Manager = GameObject.Find("StageManager");

        BottunScriptL = GameObject.Find("ButtonL").GetComponent <Bottun>();
        BottunScriptR = GameObject.Find("ButtonR").GetComponent <Bottun>();
    }