예제 #1
0
        public SentryModel(Sentry sentry, Game1 game)
            : base()
        {
            this.sentry = sentry;
            this.game = game;

            pos = sentry.pos;
            scale = new Vector3(0.2f);

            model = ModelLibrary.sentry;
            bodyTex = TextureManager.sentryBod;
            visorTex = TextureManager.sEye3;

            ant = model.Bones["anten"];
            topCap = model.Bones["topCap"];
            visor = model.Bones["visor"];
            midCap = model.Bones["midCap"];
            canRot = model.Bones["cannonRound"];
            cannon = model.Bones["cannon"];
            botCap = model.Bones["botCap"];

            topOffset = Vector3.Zero;
            tiltRot = 0;
            spinRot = 0;
        }
예제 #2
0
        public SentryProjectile(Vector3 pos, Vector3 direction, Game1 game, Sentry enemy)
            : base()
        {
            this.direction = direction;
            this.game = game;
            this.pos = pos;
            this.rot.Y = (float)Math.Atan2(direction.X, direction.Z);
            this.enemy = enemy;

            speed = 50;
            life = 120;
            delete = false;
            damage = 20;

            boundingBox = new OOBB(pos, direction, 0.3f, 1); // Need to be changed to be actual projectile dimensions
            col = new CircleCollider(pos, 0.2f);

            model = new ProjectileModel(this, TextureManager.elecRound64, TextureManager.elecRound64, TextureManager.elecTrail64, Color.Red, Color.Orange, game);

            game.modelManager.addEffect(model);
        }