コード例 #1
0
        public void StartChainedPitch(ChainPitchInfo info)
        {
            ChainedPitch newChainedPitch = new ChainedPitch(info);

            int lastLocationIndex = -1;

            for (int i = 0; i < newChainedPitch.info.NumberOfPitches; i++)
            {
                //Give it a source
                newChainedPitch.Pitches[i].PitchLocationIndex = RequestPitchLocation(newChainedPitch.info.pitchType, lastLocationIndex);
                newChainedPitch.Pitches[i].Source             = SpawnLocations[newChainedPitch.Pitches[i].PitchLocationIndex];

                //Store it for the next one
                lastLocationIndex = newChainedPitch.Pitches[i].PitchLocationIndex;

                //Find it's target
                newChainedPitch.Pitches[i].intendedTarget = suit.FindRandomLocation().gameObject;

                //Set the type of money we are pitching
                newChainedPitch.Pitches[i].TypeOfMoneyPitched = newChainedPitch.info.PitchContents[i];

                //Maybe give it an intended arc height?
                //Perhaps the air time?

                RunningPossibleScore += HeistManager.Inst.GetMonetaryValue(newChainedPitch.info.PitchContents[i]);
            }

            StartCoroutine(InitiateChainedPitch(newChainedPitch));
        }
コード例 #2
0
            public ChainedPitch(ChainPitchInfo pitchInfo)
            {
                info    = pitchInfo;
                Pitches = new Pitch[info.NumberOfPitches];


                for (int i = 0; i < Pitches.Length; i++)
                {
                    Pitches[i] = new Pitch();
                }
            }