Introduction to Abstract Classes

Video loading...

Transcript language code: 

Join Drupalize.Me to watch this video

Join today and gain instant access to our entire video library.

Log in Sign up
  • 0:04
    There is one more thing that's special about the rebel ships.
  • 0:07
    Since they're the good guys, we're going to give them some extra jedi power.
  • 0:12
    Inside of Ship, we have a jedi factor which is a value that is set from the database
  • 0:18
    and a getJediFactor function. In the battle manager, this is used to figure out
  • 0:23
    if some super awesome jedi powers are used during the battle.
  • 0:26
    For rebel ships, the jedi powers work differently than empire ships.
  • 0:31
    They always have at least some jedi power. Sometimes there's a lot,
  • 0:37
    and sometimes it's lower depending on what side of the galaxy they woke up on that day.
  • 0:41
    So instead of making this a dynamic value that we set in the database,
  • 0:46
    let's create a public function getJediFactor.
Loading ...