コード例 #1
0
ファイル: AIClassic.cs プロジェクト: OmniOrcus/Audio_Pong
 // Use this for initialization
 void Awake()
 {
     selfMotion = gameObject.transform;
     ballLink   = GameObject.FindGameObjectWithTag("Master").GetComponent <RoundStarter>();
     player     = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControler>();
     bounce     = gameObject.GetComponent <AudioSource>();
     deltaY     = (upperBound - lowerBound);
 }
コード例 #2
0
 void Update()
 {
     if (m_input.GetPause())
     {
         RoundStarter.RestartRound();
         DeactivateVictoryWindow();
     }
 }
コード例 #3
0
ファイル: DeadZone.cs プロジェクト: OmniOrcus/Audio_Pong
    void Awake()
    {
        GameObject master = GameObject.FindGameObjectWithTag("Master");

        starter  = master.GetComponent <RoundStarter>();
        scores   = master.GetComponent <ScoreManager>();
        gameOver = GameObject.Find("GameOver").GetComponent <GameOverHandler>();
    }
コード例 #4
0
ファイル: BallPlace.cs プロジェクト: OmniOrcus/Audio_Pong
 // Use this for initialization
 void Awake()
 {
     ballDrone = GetComponent <AudioSource>();
     ballLink  = GameObject.FindGameObjectWithTag("Master").GetComponent <RoundStarter>();
     //deltaPitch = (highPitch - lowPitch)/2;
     //basePitch = deltaPitch + lowPitch;
     deltaVolume = (highVolume - lowVolume) / 2;
     baseVolume  = deltaVolume + lowVolume;
 }
コード例 #5
0
 // Use this for initialization
 void Awake()
 {
     AlignedSound     = GetComponent <AudioSource>();
     ballLink         = GameObject.FindGameObjectWithTag("Master").GetComponent <RoundStarter>();
     playerLink       = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControler>();
     alignmentBuffer *= alignmentBuffer;
     falloffBuffer   *= falloffBuffer;
     maxVolume        = AlignedSound.volume;
 }
コード例 #6
0
    void InitializeScene()
    {
        // Get weapon infos
        //RStarter.WeaponsToSpawn = weapons;

        RoundStarter.InitializeRound(GetAtivePlayerInfos());

        // Set winners initial info
        Wins = new int[NumOfPlayers];
        for (int i = 0; i < Wins.Length; i++)
        {
            Wins[i] = 0;
        }
    }
コード例 #7
0
    // Use this for initialization
    void Awake()
    {
        flatMargin *= flatMargin;

        ballSound  = GetComponent <AudioSource>();
        ballLink   = GameObject.FindGameObjectWithTag("Master").GetComponent <RoundStarter>();
        playerLink = GameObject.FindGameObjectWithTag("Player").GetComponent <PlayerControler>();


        //deltaPitch = (highPitch - lowPitch)/2;
        //basePitch = deltaPitch + lowPitch;
        deltaVolume = (highVolume - lowVolume) / 2;
        baseVolume  = deltaVolume + lowVolume;
    }
コード例 #8
0
 public void Awake()
 {
     Debug.Assert(instance == null, this.gameObject.name + " - RoundStarter : must be unique!");
     instance = this;
 }