public void Draw(IResourceImage resource, int layer, MegaMan.Common.Geometry.Point position, MegaRect? sourceRect = null, bool flipHorizontal = false, bool flipVertical = false) { if (!IsLayerEnabled(layer)) return; var texture = _loadedTextures[resource.ResourceId]; var batch = _spriteBatchLayers[layer]; if (resource.PaletteName != null) { var palette = PaletteSystem.Get(resource.PaletteName); if (palette != null) { VerifyPaletteSwaps(palette, resource.ResourceId, texture); texture = this._paletteSwaps[resource.ResourceId][palette.CurrentIndex]; } } var destination = new Vector2(position.X, position.Y); XnaRect? source = null; if (sourceRect != null) source = new XnaRect(sourceRect.Value.X, sourceRect.Value.Y, sourceRect.Value.Width, sourceRect.Value.Height); SpriteEffects effect = SpriteEffects.None; if (flipHorizontal) effect = SpriteEffects.FlipHorizontally; if (flipVertical) effect |= SpriteEffects.FlipVertically; batch.Draw(texture, destination, source, _opacityColor, 0, Vector2.Zero, 1, effect, 0); }
//public AudioClip bgMusic; public GameWorldState(GamePanel gamePanel, GameTime time) : base(gamePanel, time) { texts1[0] = "We are heros, and our mission is protecting our Home\nEarth...."; texts1[1] = "There was a Monster from University on Earth in 10 years\n" + "and we lived in the scare in that 10 years...."; texts1[2] = "Now is the time for us, kill it and get freedom!...."; texts1[3] = " LET'S GO!....."; textTutorial = texts1[0]; bufferedImage = new Bitmap(GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT); megaMan = new MegaMan(400, 400, this); physicalMap = new PhysicalMap(0, 0, this); backgroundMap = new BackgroundMap(0, 0, this); camera = new Camera(0, 50, GameFrame.SCREEN_WIDTH, GameFrame.SCREEN_HEIGHT, this); bulletManager = new BulletManager(this); particularObjectManager = new ParticularObjectManager(this); particularObjectManager.addObject(megaMan); initEnemies(); //bgMusic = CacheDataLoader.getInstance().getSound("bgmusic"); previousState = state; }
void Start() { mAnimator = transform.parent.GetComponent <Animator>(); mMegaManRef = GameObject.Find("player").GetComponent <MegaMan>(); mBusterSound = GameObject.Find("Fire").GetComponent <AudioSource>(); }
void Start() { mMegaMan = GameObject.Find("Mega Man").GetComponent <MegaMan>(); mFilled = transform.FindChild("Filled").GetComponentsInChildren <SpriteRenderer>(); // mEmpty = transform.FindChild("Empty").GetComponentsInChildren<SpriteRenderer>(); mMaxHealth = mFilled.Length; mIndex = mFilled.Length - 1; }
void Start() { mAnimator = transform.parent.GetComponent <Animator>(); mMegaManRef = transform.parent.GetComponent <MegaMan>(); mBusterSound = transform.parent.GetComponent <AudioSource>(); }
static void Main(string[] args) { MegaMan mega = new MegaMan(); mega.Correr(); Zero zero = new Zero(); zero.Pulo(); }
void Start() { mAnimator = transform.parent.GetComponent <Animator>(); // TODO: Get a reference to the following items and store them: // - MegaMan component in the "Mega Man" game object (store in "mMegaManRef") // - AudioSource component in "BusterGun" game object (store in "mBusterSound") mMegaManRef = transform.parent.GetComponent <MegaMan>(); mBusterSound = GetComponent <AudioSource>(); }
static void Main(string[] args) { MegaMan jogador = new MegaMan(); Console.WriteLine($"Jogador 1 = {jogador.Correr()}"); Zero jogador2 = new Zero(); jogador2.Correr(); }
static void Main(string[] args) { MegaMan megaMan = new MegaMan(); Console.WriteLine($"MegaMan - {megaMan.Correr()}"); Zero zero = new Zero(); Console.WriteLine($"Zero - {zero.Correr()}"); }
static void Main(string[] args) { MegaMan jogador1 = new MegaMan(); Console.WriteLine($"Jogador 1 = {jogador1.Correr()} e {jogador1.Pular()}"); Zero jogador2 = new Zero(); Console.WriteLine($"Jogador 2 = {jogador2.Correr()} e {jogador2.Pular()}"); //fim }
static void Main(string[] args) { Zero z = new Zero(); MegaMan m = new MegaMan(); Console.WriteLine(z.Correr()); Console.WriteLine(z.Pular()); Console.WriteLine(m.Correr()); Console.WriteLine(m.Pular()); }
static void Main(string[] args) { MegaMan jogador = new MegaMan(); Console.WriteLine($"MegaMan = {jogador.Correr()}"); Console.WriteLine($"MegaMan = {jogador.Pular()}"); Console.WriteLine($"MegaMan = habilidade: {jogador.Buster}"); Zero jogador2 = new Zero(); Console.WriteLine($"Zero = {jogador2.Correr()}"); Console.WriteLine($"Zero = {jogador2.Pular()}"); Console.WriteLine($"Zero = habilidade: {jogador2.Sword}"); }
void Start() { mMegaMan = GameObject.Find("Mega Man").GetComponent <MegaMan>(); }
private ScreenDocument WrapScreen(MegaMan.Common.ScreenInfo screen) { ScreenDocument doc = new ScreenDocument(screen, this); screens.Add(screen.Name, doc); doc.Renamed += ScreenRenamed; doc.TileChanged += () => Dirty = true; doc.Resized += (w, h) => OnScreenResized(doc, w, h); return doc; }
private void SetCanvasLocation(ScreenCanvas surface, MegaMan.Common.Geometry.Point location) { surface.Margin = new Thickness(location.X, location.Y, 0, 0); }
public static void Draw(IRenderingContext renderContext, int layer, string font, string text, MegaMan.Common.Geometry.Point position) { fonts[font].Draw(renderContext, layer, text, position); }
static void Main(string[] args) { MegaMan mega = new MegaMan(); mega.Correr(); }
private void Awake() { m_Character = GetComponent <MegaMan>(); }
void Start() { mAnimator = transform.parent.GetComponent <Animator>(); mMegaManRef = transform.parent.GetComponent <MegaMan>(); }