Package puppyeyes.engine.Actors

Source Code of puppyeyes.engine.Actors.Properties

/*
* To change this template, choose Tools | Templates
* and open the template in the editor.
*/
package puppyeyes.engine.Actors;

import puppyeyes.engine.Actor;
import puppyeyes.engine.Sprite;

/**
*
* @author majora
*/
public class Properties {
    private boolean isAlive = true;
    private boolean solid = false;
    private Sprite collision = null;
   
    private Actor parent;
   
    public Properties(Actor parent) {
        this.parent = parent;
    }
   
    public boolean isAlive() { return isAlive; }
    public boolean isDead() { return !isAlive; }
    public void kill() { isAlive = false; }
   
    public boolean isSolid() { return solid; }
    public void setSolid(boolean value) { solid = value; }
   
    public boolean hasCollision() {
        if (collision==null) { return false;
        } else { return true; }
    }
    public void setCollisionMask(Sprite mask) { collision = mask; }
    public void setCollisionMask(String mask) { collision = new Sprite(mask); }
    public Sprite getCollisionMask() { return collision; }
}
TOP

Related Classes of puppyeyes.engine.Actors.Properties

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.