예제 #1
0
            public void AddClientOrb(BaseClientOrb newOrb)
            {
                if (!this.isAuthority)
                {
                    //Debug.Log( "AddClientOrb called without authority" );
                    return;
                }
                if (newOrb == null)
                {
                    //Debug.Log( "Null orb not added" );
                    return;
                }
                newOrb.outer = this;
                newOrb.Begin();

                if (newOrb.totalDuration == 0f)
                {
                    //Debug.Log( "Orb failed to assign duration" );
                    return;
                }

                newOrb.remainingDuration = newOrb.totalDuration;

                this.activeOrbs.Add(newOrb);
            }
예제 #2
0
 private void EndClientOrb(BaseClientOrb orb)
 {
     if (!this.isAuthority)
     {
         //Debug.Log( "EndClientOrb called without authority" );
         return;
     }
     if (!this.activeOrbs.Contains(orb))
     {
         //Debug.Log( "EndClientOrb called on non-existant orb" );
         return;
     }
     orb.End();
     this.destroy.Add(orb);
 }
예제 #3
0
            private void UpdateClientOrb(BaseClientOrb orb, Single deltaT)
            {
                if (!this.isAuthority)
                {
                    //Debug.Log( "UpdateClientOrb called without authority" );
                    return;
                }

                if (!this.activeOrbs.Contains(orb))
                {
                    //Debug.Log( "UpdateClientOrb called on non-existant orb" );
                    return;
                }

                orb.remainingDuration -= deltaT;
                orb.Tick(deltaT);

                if (orb.remainingDuration <= 0f)
                {
                    this.EndClientOrb(orb);
                }
            }