Package clientMessages

Source Code of clientMessages.NewSpell

package clientMessages;

import spells.Spell;
import Client.ClientGameState;
import Global_Package.Entity;
import Global_Package.Enums;

public class NewSpell extends ClientEventIn{
  public final int ID,type;
  public final double x,y;
  public final int OwnerID;
  public NewSpell(int IDIn, int OwnerID,int typeIn,double xIn,double yIn){
      ID=IDIn;
      type=typeIn;
      x=xIn;
      y=yIn;
      this.OwnerID=OwnerID;
  }

  @Override
  public void eventIn(ClientGameState g) {
    for(Entity e:Enums.effectiveMap.values()){
      if(e.checkType(type)){
        Spell i=(Spell)e;
        i.newSpell(this, g);
        return; //only works once any way
      }
       
    }
  }
 
}
TOP

Related Classes of clientMessages.NewSpell

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.