Ejemplo n.º 1
0
        public override bool AddToWorld()
        {
            //Create a new game when added - have to do it here rather than constructor so game takes correct coords.
            TomteHockeyGame game = new TomteHockeyGame(this);

            m_game = game;

            return(base.AddToWorld());
        }
Ejemplo n.º 2
0
        public TomteHockeyPuck(TomteHockeyGame game)
        {
            m_game = game; //assign a field to this puck.

            //We assign this handler to check whenever the puck stops moving whether it has scored.
            GameEventMgr.AddHandler(this, GameNPCEvent.ArriveAtTarget, new DOLEventHandler(ArriveAtTarget));

            //We also want to be void of a brain for this puck.
            BlankBrain brain = new BlankBrain();

            SetOwnBrain(brain);

            Model = 671;
            Size  = 20;
            Name  = "Puck";
            Flags = 0; //no flags.
            Realm = 0;

            //prevent nullrefException by assigning a value.
            m_hitLastByRedTeam = false;
        }