Class Enemy.EnemyReference

java.lang.Object
com.prineside.tdi2.Enemy.EnemyReference
All Implemented Interfaces:
com.esotericsoftware.kryo.KryoSerializable
Enclosing class:
Enemy

public static class Enemy.EnemyReference extends Object implements com.esotericsoftware.kryo.KryoSerializable
Use this wrapper to store a reference to an enemy (always if there's a chance the enemy will become unregistered between the moment it is stored & stored reference is used in the code) No need to use as method argument / as local variable (if there's no chance for the enemy to become unregistered while it is being used locally)
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
     
    void
    write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
     

    Methods inherited from class java.lang.Object

    equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

  • Constructor Details

    • EnemyReference

      public EnemyReference()
  • Method Details

    • write

      public void write(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Output output)
      Specified by:
      write in interface com.esotericsoftware.kryo.KryoSerializable
    • read

      public void read(com.esotericsoftware.kryo.Kryo kryo, com.esotericsoftware.kryo.io.Input input)
      Specified by:
      read in interface com.esotericsoftware.kryo.KryoSerializable