コード例 #1
0
ファイル: TestUI.cs プロジェクト: zwx0641/Color2
 void Start()
 {
     soundEffectsInGame = GameObject.Find("LevelSeletor").GetComponent <SoundEffectsInGame>();
     //bloodImage.fillAmount = 1;
     AudioSource = GameObject.Find("LevelSeletor").GetComponent <AudioSource>();
     image       = this.GetComponent <Image>();
 }
コード例 #2
0
 // Start is called before the first frame update
 void Start()
 {
     soundEffectsInGame = GameObject.Find("LevelSeletor").GetComponent <SoundEffectsInGame>();
     camera             = GameObject.FindWithTag("MainCamera");
     AudioSource        = GameObject.Find("LevelSeletor").GetComponent <AudioSource>();
     rewardText         = GameObject.Find("RewardText").GetComponent <Text>();
     level = GameObject.Find("Level").GetComponent <Text>();
 }
コード例 #3
0
    // Start is called before the first frame update
    void Start()
    {
        levelParent = GameObject.Find("LevelParent");
        getInput    = levelParent.GetComponent <GetInput>();
        //transform.GetComponent<Rigidbody>().AddForce(transform.forward * speed);
        timer  = GameObject.FindWithTag("GameController").GetComponent <Timer>();
        camera = transform.GetChild(0).gameObject;

        SoundEffectsInGame = GameObject.Find("LevelSeletor").GetComponent <SoundEffectsInGame>();
        distance           = 0.025f;
        AudioSource        = GameObject.Find("LevelSeletor").GetComponent <AudioSource>();
    }
コード例 #4
0
ファイル: ArcSlider.cs プロジェクト: zwx0641/Color2
    public void Start()
    {
        circleRadius = Mathf.Sqrt(Mathf.Pow(handleButton.GetComponent <RectTransform>().localPosition.x, 2) + Mathf.Pow(handleButton.GetComponent <RectTransform>().localPosition.y, 2));
        ignoreInTouchRadiusHandleOffset = circleRadius - ignoreInTouchRadiusHandleOffset;

        handleButtonLocation = handleButton.GetComponent <RectTransform>().localPosition;
        width  = GetComponent <RectTransform>().rect.width;
        height = GetComponent <RectTransform>().rect.height;
        transform.GetComponent <RepeatOn>().OnRelease.AddListener(InstantiateBullet);

        timer              = GameObject.FindWithTag("GameController").GetComponent <Timer>();
        camera             = GameObject.Find("Main Camera").gameObject;
        soundEffectsInGame = GameObject.Find("LevelSeletor").GetComponent <SoundEffectsInGame>();
        AudioSource        = GameObject.Find("LevelSeletor").GetComponent <AudioSource>();
    }
コード例 #5
0
 // Start is called before the first frame update
 void Start()
 {
     soundEffectsInGame = GameObject.Find("LevelSeletor").GetComponent <SoundEffectsInGame>();
     AudioSource        = GameObject.Find("LevelSeletor").GetComponent <AudioSource>();
 }