private void Start()
    {
        _objIntController = ServiceLocator.Instance.Controller.GetComponent <ControllerObjectInteraction>();

        _MakeData();
        if (_myData.cat == ServiceLocator.ThingCategory.Items)
        {
            (_myData as Item_Base).state = startingStateForItems;
            if (startingCapacity != 100)
            {
                _ItemCapacityOverride();
            }
        }
        if (_myData.cat == ServiceLocator.ThingCategory.Equipment)
        {
            (_myData as Equipment_Base).state = startingStateForEqpt;
            if (stowedOrInstalled.Count > 0)
            {
                _EqptCheckStowOverride();
            }
        }

        ServiceLocator.Instance.EManager.Fire(new Event_NewInteractable(_myData, transform.position, false));

        _RegisterAndStowOverrideContents();

        Destroy(this.gameObject);
    }
Exemplo n.º 2
0
    public override void Awake()
    {
        priority = 2500;
        base.Awake();

        _gameModel   = ServiceLocator.Instance.Model.GetComponent <ModelGame>();
        _inputModel  = ServiceLocator.Instance.Model.GetComponent <ModelInput>();
        _objIntModel = ServiceLocator.Instance.Model.GetComponent <ModelObjectInteraction>();

        _objIntCtrlr   = ServiceLocator.Instance.Controller.GetComponent <ControllerObjectInteraction>();
        _eqptMenuCtrlr = ServiceLocator.Instance.Controller.GetComponent <ControllerMenuEqpt>();

        _p0_Transfrom = ServiceLocator.Instance.Character0;
        _p1_Transform = ServiceLocator.Instance.Character1;

        _p0_RigidBody = _p0_Transfrom.GetComponent <Rigidbody>();
        _p1_RigidBody = _p1_Transform.GetComponent <Rigidbody>();
    }
Exemplo n.º 3
0
    public override void Awake()
    {
        priority = 2998;
        base.Awake();

        _gameModel     = ServiceLocator.Instance.Model.GetComponent <ModelGame>();
        _objIntModel   = ServiceLocator.Instance.Model.GetComponent <ModelObjectInteraction>();
        _eqptMenuModel = ServiceLocator.Instance.Model.GetComponent <ModelMenuEqpt>();
        _objIntCtrlr   = ServiceLocator.Instance.Controller.GetComponent <ControllerObjectInteraction>();

        _canvas = ServiceLocator.Instance.View.Find("Canvas");

        _p0_MenuParent = _canvas.Find("P0 Menu Parent");
        _p1_MenuParent = _canvas.Find("P1 Menu Parent");

        Debug.Assert(_p0_MenuParent != null);
        Debug.Assert(_p1_MenuParent != null);
    }
Exemplo n.º 4
0
 public override void Initialize()
 {
     objIntCtrlr = ServiceLocator.Instance.Controller.GetComponent <ControllerObjectInteraction>();
     gameModel   = ServiceLocator.Instance.Model.GetComponent <ModelGame>();
     inputModel  = ServiceLocator.Instance.Model.GetComponent <ModelInput>();
 }