Esempio n. 1
0
    protected virtual void Start()
    {
        var directionalInput = GetComponent <ZMDirectionalInput>();

        Debug.AssertFormat(directionalInput != null, "{0} requires directional input component.",
                           Utilities.GetClassNameForObject(this));

        _inputEventNotifier              = directionalInput._inputEventNotifier;
        _inputEventNotifier.OnMoveEvent += HandleMove;

        if (isActiveOnStart)
        {
            directionalInput.ConfigureItemWithID(_playerInfo.ID);
        }

        if (_renderer != null)
        {
            _baseColor = Utilities.GetRGB(_renderer.material.color, _playerInfo.standardColor);
        }
    }
Esempio n. 2
0
    protected override void Awake()
    {
        base.Awake();

        _inputEventNotifier = new ZMDirectionalInputEventNotifier();
    }