Ejemplo n.º 1
0
    // Use this for initialization
    protected override void Start()
    {
        var ex = new NullReferenceException("TestException");

        ex.Log("Testing comment");
        MaxHp = Database.instance.PlayerBaseHP;
        base.Start();
        if (_centerOfReferenceForJuice == null)
        {
            _centerOfReferenceForJuice = transform;
        }
        if (_mainRigidbody == null)
        {
            _mainRigidbody = GetComponent <Rigidbody2D>();
        }
        if (_inputController == null)
        {
            _inputController = GetComponent <IPlatformer2DUserControl>();
        }
        if (_character == null)
        {
            _character = GetComponent <PlatformerCharacter2D>();
        }
        HpChanged += OnHpChanged;
    }
Ejemplo n.º 2
0
 // Use this for initialization
 protected override void Start()
 {
     var ex = new NullReferenceException("TestException");
     ex.Log("Testing comment");
     MaxHp = Database.instance.PlayerBaseHP;
     base.Start();
     if (_centerOfReferenceForJuice == null) _centerOfReferenceForJuice = transform;
     if (_mainRigidbody == null) _mainRigidbody = GetComponent<Rigidbody2D>();
     if (_inputController == null) _inputController = GetComponent<IPlatformer2DUserControl>();
     if (_character == null) _character = GetComponent<PlatformerCharacter2D>();
     HpChanged += OnHpChanged;
 }