article thumbnail

Character Sprite Overhaul

GameDev.Net

Character Sprite Overhaul New Male and Female Sprites We added new sprites for male and female players. New Weapon sprites There are now new sprites for every weapon and armor in the game. The characters also got a walking animation. figure cl

Sprite 130
article thumbnail

Sprite aspect ratio

Cocos

_addEventListeners() this.resize() } protected onDisable() { this._removeEventListeners() _removeEventListeners() } protected _addEventListeners() { director.on(Director.EVENT_AFTER_UPDATE, Director.EVENT_AFTER_UPDATE, this.resize, this) this.node.on(Node.EventType.SIZE_CHANGED, Node.EventType.SIZE_CHANGED, this.resize, this) this.node.on(Node.EventType.ANCHOR_CHANGED,

Sprite 52
Insiders

Sign Up for our Newsletter

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Trending Sources

article thumbnail

Sprite keep aspect

Cocos

muxiandong: Best option: you could add a node above the Sprite node’s hierarchy, treat the node where the Sprite component is located as a separate node, and set the sizeMode property to raw.

Sprite 52
article thumbnail

Sprite keep aspect

Cocos

[link] Hi, you can set the sizeMode property of the Sprite to raw, which serves to use the size of the original image. However it will change the size of the node where the current Sprite component is located (UITransform), i.e. if you modify the size of the node then the sizeMode will change to custom.

Sprite 52
article thumbnail

Sprite keep aspect

Cocos

ccclass('PreserveAspectRatioComponent') @requireComponent(Sprite) @executeInEditMode export class PreserveAspectRatioComponent extends Component { private sprite: Sprite private uiTransform: UITransform protected onEnable() { this.sprite = this.getComponent(Sprite) this.uiTransform = this.getComponent(UITransform) this._addEventListeners();

Sprite 52
article thumbnail

Artwork Update: Sprite Rigs Complete!

Yotes Games

It took about a month and a half, but ALL the pony sprite pieces have finally been drawn and as of right now I can begin the frame-by-frame animation process! Should be done and in-game by April's end (but given how that estimate's measured in gamedev time, we'll see how that goes ?).

Sprite 52
article thumbnail

Sprite keep aspect

Cocos

Is there any option for Sprites like “Preserve aspect” in Unity? I want whatever node size to keep my sprite original ratio

Sprite 52