Пример #1
0
 // Update is called once per frame
 // ADDED CODE HERE!!!!!!!!!!!!!!!!!!!!
 void Update()
 {
     meatballInPlay = FindObjectOfType <Meatball>();
     if (meatballInPlay == null)
     {
         return;
     }
     howMuchToScore = meatballInPlay.scoreWorth;
 }
Пример #2
0
        public mcPoint(float x, float y, float z, int px, int py, int pz, Meatball thismcblob)
        {
            this.index = new float[3];
            index[0]   = x; index[1] = y; index[2] = z;

            this.px     = px;
            this.py     = py;
            this.pz     = pz;
            this.cntr   = 0;
            this.mcblob = thismcblob;
        }
        /// <summary>
        /// Create a meatball which adds three particles with springs to the system.
        /// </summary>
        /// <param name="system"></param>
        /// <param name="particle"></param>
        public override void AddParticle(ParticleSystem system, Particle particle)
        {
            //base.AddParticle(system, particle); // ignore the base

            double   x        = ParticleSystem.random.NextDouble(X1, X2);
            Meatball meatball = new Meatball(system, this, x, LinearEquation(x),
                                             MinSpringConstant, MaxSpringConstant, MinDampeningConstant, MaxDampeningConstant,
                                             MinRestLength, MaxRestLength, true);

            // add each particle to the dictionary and its associated meatball.
            foreach (Particle p in meatball.Particles)
            {
                mMeatballs.Add(p, meatball);
            }
        }
Пример #4
0
        /// <summary>
        /// Create a meatball which adds three particles with springs to the system. 
        /// </summary>
        /// <param name="system"></param>
        /// <param name="particle"></param>
        public override void AddParticle(ParticleSystem system, Particle particle)
        {
            //base.AddParticle(system, particle); // ignore the base

            double x = ParticleSystem.random.NextDouble(X1, X2);
            Meatball meatball = new Meatball(system, this, x, LinearEquation(x),
                                             MinSpringConstant, MaxSpringConstant, MinDampeningConstant, MaxDampeningConstant,
                                             MinRestLength, MaxRestLength, true);
            // add each particle to the dictionary and its associated meatball.
            foreach (Particle p in meatball.Particles)
            {
                mMeatballs.Add(p, meatball);
            }
        }