/// <summary>
 /// Awake this instance.
 /// </summary>
 void Awake()
 {
     // Setting up references.
     rigidBody2DUnidirectional = GetComponent<RigidBody2DUnidirectional>();
     veadoAnimationSetter = GetComponent<VeadoAnimationSetter>();
     jump2d = GetComponent<Jump2D>();
     NotificationCenter.DefaultCenter().AddObserver(this, "ReceiveDamage");
 }
예제 #2
0
    private Jump2D jump2d;                                       //Jump2D reference

    /// <summary>
    /// Awake this instance.
    /// </summary>
    void Awake()
    {
        // Setting up references.
        rigidBody2DUnidirectional = GetComponent <RigidBody2DUnidirectional>();
        veadoAnimationSetter      = GetComponent <VeadoAnimationSetter>();
        jump2d = GetComponent <Jump2D>();
        NotificationCenter.DefaultCenter().AddObserver(this, "ReceiveDamage");
    }
/// <summary>
/// Awake this instance.
/// </summary>
    void Awake()
    {
        // Setting up references.
        circle = GetComponent <CircleCollider2D> ();
        rigidBody2DUnidirectional = GetComponent <RigidBody2DUnidirectional>();
        cthulhuAnimationSetter    = GetComponent <CthulhuAnimationSetter>();
        jump2d = GetComponent <Jump2D>();
        NotificationCenter.DefaultCenter().AddObserver(this, "ReceiveDamage");
    }
예제 #4
0
 // Use this for initialization
 void Awake()
 {
     userControl = this;
     if (!rigidBody2DUnidirectional)
         rigidBody2DUnidirectional = GetComponent<RigidBody2DUnidirectional>();
     if (!singleMeleeAttack)
         singleMeleeAttack = GetComponent<SingleMeleeAttack>();
     jump2d = GetComponent<Jump2D>();
 }
예제 #5
0
    void Awake()
    {
        //player = GameObject.Find("Cthulhu").transform; //finds player transform reference
        santa = this;
        NotificationCenter.DefaultCenter().AddObserver(this, "QuitScene");
        NotificationCenter.DefaultCenter().AddObserver(this, "ReceiveDamage");
        NotificationCenter.DefaultCenter().AddObserver(this, "OnDead");
        NotificationCenter.DefaultCenter().AddObserver(this, "StopSpawner");
        NotificationCenter.DefaultCenter().AddObserver(this, "OnLvlUp");

        playerJump2D = player.GetComponent <Jump2D>(); //finds Jump2D reference
    }
예제 #6
0
    void Awake()
    {
        //player = GameObject.Find("Cthulhu").transform; //finds player transform reference
        santa = this;
        NotificationCenter.DefaultCenter().AddObserver(this, "QuitScene");
        NotificationCenter.DefaultCenter().AddObserver(this, "ReceiveDamage");
        NotificationCenter.DefaultCenter().AddObserver(this, "OnDead");
        NotificationCenter.DefaultCenter().AddObserver(this, "StopSpawner");
        NotificationCenter.DefaultCenter().AddObserver(this, "OnLvlUp");

        playerJump2D = player.GetComponent<Jump2D>(); //finds Jump2D reference
    }
예제 #7
0
 // Use this for initialization
 void Awake()
 {
     userControl = this;
     if (!rigidBody2DUnidirectional)
     {
         rigidBody2DUnidirectional = GetComponent <RigidBody2DUnidirectional>();
     }
     if (!singleMeleeAttack)
     {
         singleMeleeAttack = GetComponent <SingleMeleeAttack>();
     }
     jump2d = GetComponent <Jump2D>();
 }
 public override void OnSpawned()
 {
     base.OnSpawned ();
     if (!player)
     {
         player = PlayerStatus.playerStatus.gameObject;
         rigidBody2DUnidirectional = player.GetComponent<RigidBody2DUnidirectional>();
         jump2d = player.GetComponent<Jump2D>();
         backgrondDarkner = Camera.main.transform.FindChild("BackgroundDarkener").GetComponent<SpriteRenderer>();
     }
     newUserControl = null;
     newRigidBody2DUnidirectional = null;
 }
예제 #9
0
 public override void OnSpawned()
 {
     base.OnSpawned();
     if (!player)
     {
         player = PlayerStatus.playerStatus.gameObject;
         rigidBody2DUnidirectional = player.GetComponent <RigidBody2DUnidirectional>();
         jump2d           = player.GetComponent <Jump2D>();
         backgrondDarkner = Camera.main.transform.FindChild("BackgroundDarkener").GetComponent <SpriteRenderer>();
     }
     newUserControl = null;
     newRigidBody2DUnidirectional = null;
 }
예제 #10
0
 void Awake()
 {
     if (myAnimator == null)
     {
         Debug.LogError(gameObject + " animator is null. Please set the reference.");
     }
     weaponManager  = GetComponent <MegamanWeaponManager> ();
     hitpoints      = GetComponent <Hitpoints> ();
     _myRigidbody2D = GetComponent <Rigidbody2D> ();
     _myCollider2D  = GetComponent <Collider2D> ();
     myJump2D       = GetComponent <Jump2D> ();
     myWallJump2D   = GetComponent <WallJump2D> ();
     playerInput    = GetComponent <MegamanInput> ();
 }
예제 #11
0
 /// <summary>
 /// Set some references
 /// </summary>
 void Awake()
 {
     jump2D      = this;
     groundCheck = transform.Find("groundCheck");        // Setting up references.
 }
예제 #12
0
 /// <summary>
 /// Set some references
 /// </summary>
 void Awake()
 {
     jump2D = this;
     groundCheck = transform.Find("groundCheck");        // Setting up references.
 }
 /// <summary>
 /// Awake this instance.
 /// </summary>
 void Awake()
 {
     jump2D = GetComponent<Jump2D>();
     NotificationCenter.DefaultCenter().AddObserver(this, "QuitScene");
 }
예제 #14
0
 private void Awake()
 {
     move2D = GetComponent <Move2D>();
     jump2D = GetComponent <Jump2D>();
 }
 /// <summary>
 /// Awake this instance.
 /// </summary>
 void Awake()
 {
     jump2D = GetComponent <Jump2D>();
     NotificationCenter.DefaultCenter().AddObserver(this, "QuitScene");
 }
 /// <summary>
 /// Awake this instance.
 /// </summary>
 void Awake()
 {
     // Setting up references.
     circle = GetComponent<CircleCollider2D> ();
     rigidBody2DUnidirectional = GetComponent<RigidBody2DUnidirectional>();
     cthulhuAnimationSetter = GetComponent<CthulhuAnimationSetter>();
     jump2d = GetComponent<Jump2D>();
     NotificationCenter.DefaultCenter().AddObserver(this, "ReceiveDamage");
 }
예제 #17
0
 void Awake()
 {
     if(myAnimator == null)
     {
         Debug.LogError(gameObject + " animator is null. Please set the reference.");
     }
     weaponManager = GetComponent<MegamanWeaponManager> ();
     hitpoints = GetComponent<Hitpoints> ();
     _myRigidbody2D = GetComponent<Rigidbody2D> ();
     _myCollider2D = GetComponent<Collider2D> ();
     myJump2D = GetComponent<Jump2D> ();
     myWallJump2D = GetComponent<WallJump2D> ();
     playerInput = GetComponent<MegamanInput> ();
 }