Android Open Source - rpg Focus






From Project

Back to project page rpg.

License

The source code is released under:

Apache License

If you think the Android project rpg listed in this page is inappropriate, such as containing malicious code/tools or violating the copyright, please email info at java2s dot com, thanks.

Java Source Code

package org.aschyiel.rpg;
//  ww w . j  a v a  2 s .c  o  m
import org.andengine.entity.sprite.TiledSprite;
import org.aschyiel.rpg.level.Player;

/**
* The "focus" represents the current selection within the game.
* It's context sensitive to the target ( ie. friendly vs. neutral vs.
* enemy targets are to be represented differently ).
*/
public class Focus extends TiledSprite
{
  /**
  * Who we're focusing on behalf of.
  */
  private final Player perspective;

  public Focus( Resorcerer rez, Player perspective, int w, int h )
  {
    super( 0, 0, rez.getTexture( "focus" ), rez.getVertexBufferObjectManager() );
    setTarget( null );
    this.perspective = perspective;
    setSize( (float) w, (float) h );
  }
  
  public void setTarget( GameObject unit )
  {
    // Massive todo.

    // if same player or same team, friendly.
    // if neautral, say neutral.
    // else enemy.
    setAlpha( ( null == unit )? 0 : 1 );
  }
}




Java Source Code List

org.aschyiel.rpg.Coords.java
org.aschyiel.rpg.Focus.java
org.aschyiel.rpg.GameObjectFactory.java
org.aschyiel.rpg.GameObject.java
org.aschyiel.rpg.ICanHasFocus.java
org.aschyiel.rpg.IFullGameObject.java
org.aschyiel.rpg.IGameObject.java
org.aschyiel.rpg.PowerChords.java
org.aschyiel.rpg.Resorcerer.java
org.aschyiel.rpg.activities.Launcher.java
org.aschyiel.rpg.activities.Sandbox.java
org.aschyiel.rpg.activities.Terrain.java
org.aschyiel.rpg.activities.sandbox.BasicCombat.java
org.aschyiel.rpg.activities.sandbox.BasicMovement.java
org.aschyiel.rpg.activities.sandbox.MovementVsLandTypes.java
org.aschyiel.rpg.graph.ChessBoard.java
org.aschyiel.rpg.graph.DefaultPathFinder.java
org.aschyiel.rpg.graph.GirlFriend.java
org.aschyiel.rpg.graph.NavPath.java
org.aschyiel.rpg.graph.Navigator.java
org.aschyiel.rpg.graph.OnSquareClickHandler.java
org.aschyiel.rpg.graph.PathFinder.java
org.aschyiel.rpg.graph.Step.java
org.aschyiel.rpg.graph.VacancySubscriber.java
org.aschyiel.rpg.level.LandType.java
org.aschyiel.rpg.level.LevelDetail.java
org.aschyiel.rpg.level.Level.java
org.aschyiel.rpg.level.Player.java
org.aschyiel.rpg.level.UnitType.java