예제 #1
0
    // Use this for initialization
    void Start()
    {
        if (!photonView.isMine)
        {
            Destroy(GetComponent <ThirdPersonController> ());
            Destroy(GetComponent <ThirdPersonCamera> ());
            Destroy(GetComponent <MouseLook> ());
            GetComponent <Rigidbody> ().isKinematic = true;
        }
        else
        {
            cameraController = GetComponent <ThirdPersonCamera> ();
            isAi             = cameraController == null;
        }
        AIBase comp = GetComponent <AIBase> ();

        isAi = comp != null;

        correctPlayerPos = transform.position;
        myCollider       = collider;

        centerOffset = capsule.bounds.center - myTransform.position;
        headOffset   = centerOffset;
        headOffset.y = capsule.bounds.max.y - myTransform.position.y;

        distToGround = capsule.height / 2 - capsule.center.y;
        charMan      = GetComponent <CharacteristicManager> ();
        charMan.Init();
        health = charMan.GetIntChar(CharacteristicList.MAXHEALTH);
        //Debug.Log (distToGround);
    }
예제 #2
0
 public ProductListCrudConsoleService(CategoryManager categoryManager,
                                      CharacteristicManager characteristicManager,
                                      ManufacturerManager manufacturerManager,
                                      ProductManager productManager)
 {
     _categoryManager       = categoryManager;
     _characteristicManager = characteristicManager;
     _manufacturerManager   = manufacturerManager;
     _productManager        = productManager;
 }
예제 #3
0
 public CharacteristicsController(
     CharacteristicManager characteristicManager,
     CategoryManager categoryManager,
     ILogger <CharacteristicsController> logger,
     IMapper mapper)
 {
     _characteristicManager = characteristicManager;
     _categoryManager       = categoryManager;
     _logger = logger;
     _mapper = mapper;
 }
예제 #4
0
 public ProductBaseConsoleService(ProductManager productManager,
                                  OrderManager orderManager,
                                  BuyerManager buyerManager,
                                  ManufacturerManager manufacturerManager,
                                  CharacteristicManager characteristicManager)
 {
     _productManager        = productManager;
     _orderManager          = orderManager;
     _buyerManager          = buyerManager;
     _manufacturerManager   = manufacturerManager;
     _characteristicManager = characteristicManager;
 }
예제 #5
0
 public ProductsController(
     ProductManager productManager,
     CategoryManager categoryManager,
     ManufacturerManager manufacturerManager,
     CharacteristicManager characteristicManager,
     ILogger <ProductsController> logger)
 {
     _productManager        = productManager;
     _categoryManager       = categoryManager;
     _manufacturerManager   = manufacturerManager;
     _characteristicManager = characteristicManager;
     _logger = logger;
 }
예제 #6
0
    // Use this for initialization
    protected void Start()
    {
        aSource = GetComponent<AudioSource> ();

        sControl = new soundControl (aSource);//создаем обьект контроллера звука
        _canWallRun = canWallRun;
        //проигрываем звук респавна
        sControl.playClip (spawnSound);

        if (emitter != null) {
                emitter.Emit ();//запускаем эмиттер
                isSpawn = true;//отключаем движения и повреждения
        }

        if (!photonView.isMine) {

                        Destroy (GetComponent<ThirdPersonController> ());
                        Destroy (GetComponent<ThirdPersonCamera> ());
                        Destroy (GetComponent<MouseLook> ());
                        GetComponent<Rigidbody> ().isKinematic = true;
                        //ivnMan.Init ();
        } else {
            cameraController=GetComponent<ThirdPersonCamera> ();
            isAi = cameraController==null;
        }
        mainAi =  GetComponent<AIBase> ();
        isAi = mainAi!=null;

        correctPlayerPos = transform.position;
        myCollider = collider;
        ivnMan.Init ();
        centerOffset = capsule.bounds.center - myTransform.position;
        headOffset = centerOffset;
        headOffset.y = capsule.bounds.max.y - myTransform.position.y;

        distToGround = capsule.height/2-capsule.center.y;
        charMan = GetComponent<CharacteristicManager> ();
        charMan.Init ();
        health= charMan.GetIntChar(CharacteristicList.MAXHEALTH);
        if (canJump) {
            jetPackCharge = charMan.GetIntChar(CharacteristicList.JETPACKCHARGE);
        }
        ivnMan.Init ();
        AfterSpawnAction ();
        //Debug.Log (distToGround);
    }
예제 #7
0
 public CharacteristicsController(CharacteristicManager characteristicManager,
                                  ILogger <CharacteristicsController> logger)
 {
     _characteristicManager = characteristicManager;
     _logger = logger;
 }
 public CharacteristicPrintConsoleService(CharacteristicManager characteristicManager, CategoryManager categoryManager)
 {
     _characteristicManager = characteristicManager;
     _categoryManager       = categoryManager;
 }
예제 #9
0
    // Use this for initialization
    protected void Start()
    {
        if (emitter != null) {
                emitter.Emit ();//запускаем эмиттер
                isSpawn = true;//отключаем движения и повреждения
        }
        if (!photonView.isMine) {

                        Destroy (GetComponent<ThirdPersonController> ());
                        Destroy (GetComponent<ThirdPersonCamera> ());
                        Destroy (GetComponent<MouseLook> ());
                        GetComponent<Rigidbody> ().isKinematic = true;
        } else {
            cameraController=GetComponent<ThirdPersonCamera> ();
            isAi = cameraController==null;
        }
        mainAi =  GetComponent<AIBase> ();
        isAi = mainAi!=null;

        correctPlayerPos = transform.position;
        myCollider = collider;

        centerOffset = capsule.bounds.center - myTransform.position;
        headOffset = centerOffset;
        headOffset.y = capsule.bounds.max.y - myTransform.position.y;

        distToGround = capsule.height/2-capsule.center.y;
        charMan = GetComponent<CharacteristicManager> ();
        charMan.Init ();
        health= charMan.GetIntChar(CharacteristicList.MAXHEALTH);
        //Debug.Log (distToGround);
    }