Пример #1
0
#pragma warning disable 0414

    protected override void Awake()
    {
        base.Awake();

        if (!PhotonNetwork.connected)
        {
            Destroy(this);
        }

        //FirstUpdate = false;
        if (!this.isMine)
        {
            if (HeatTarget.gameObject.activeSelf == false)
            {
                HeatTarget.gameObject.SetActive(true);
            }
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl    = new PhotonTransformViewScaleControl(m_ScaleModel);
        Controller        = this.GetComponent <bl_PlayerMovement>();
        Settings          = this.GetComponent <bl_PlayerSettings>();
        PDM      = this.GetComponent <bl_PlayerDamageManager>();
        DrawName = this.GetComponent <bl_DrawName>();
    }
Пример #2
0
 public void Awake()
 {
     this.myTransform = this.transform;
     DefaultRot       = myTransform.localRotation;
     DefaultPos       = myTransform.localPosition;
     controller       = this.transform.root.GetComponent <bl_PlayerMovement>();
     Gun = transform.parent.GetComponent <bl_Gun>();
 }
Пример #3
0
 void Awake()
 {
     //Find player and FPScontroller script
     player   = transform.root.gameObject;
     motor    = player.GetComponent <bl_PlayerMovement>();
     midpoint = transform.localPosition;
     Dsmooth  = smooth;
 }
Пример #4
0
 void Awake()
 {
     //Find player and FPScontroller script
     player = transform.root.gameObject;
     motor = player.GetComponent<bl_PlayerMovement>();
     midpoint = transform.localPosition;
     Dsmooth = smooth;
 }
Пример #5
0
 public void Awake()
 {
     this.myTransform = this.transform;
     DefaultRot = myTransform.localRotation;
     DefaultPos = myTransform.localPosition;
     controller = this.transform.root.GetComponent<bl_PlayerMovement>();
     Gun = transform.parent.GetComponent<bl_Gun>();
 }
Пример #6
0
    bool prevGrounded    = true;                                        // whether the character was grounded last frame

    // Use this for initialization
    void Start()
    {
        originalLocalPos = head.localPosition;
        character        = transform.root.GetComponent <bl_PlayerMovement>();
        if (GetComponent <AudioSource>() == null)
        {
            // we automatically add an audiosource, if one has not been manually added.
            // (if you want to control the rolloff or other audio settings, add an audiosource manually)
            gameObject.AddComponent <AudioSource>();
        }
        prevPosition = transform.position;
    }
Пример #7
0
    bool prevGrounded = true;							// whether the character was grounded last frame

    //TODO
    /* Add FootSteps - Done
     * Jump detection - Done
     * Land detection - Done
     * Pos Share?
     */
    // Use this for initialization
    void Start()
    {

        originalLocalPos = head.localPosition;
        character = transform.root.GetComponent<bl_PlayerMovement>();
        if (GetComponent<AudioSource>() == null)
        {
            // we automatically add an audiosource, if one has not been manually added.
            // (if you want to control the rolloff or other audio settings, add an audiosource manually)
            gameObject.AddComponent<AudioSource>();
        }
        prevPosition = transform.position;
    }
Пример #8
0
#pragma warning disable 0414


     void Awake()
    {
        if (!PhotonNetwork.connected)
            Destroy(this);

        if (!this.isMine)
        {
            if (HeatTarget.gameObject.activeSelf == false)
            {
                HeatTarget.gameObject.SetActive(true);
            }
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl = new PhotonTransformViewScaleControl(m_ScaleModel);
        Controller = this.GetComponent<bl_PlayerMovement>();
    }
Пример #9
0
#pragma warning disable 0414


    void Awake()
    {
        if (!PhotonNetwork.connected)
        {
            Destroy(this);
        }

        if (!this.isMine)
        {
            if (HeatTarget.gameObject.activeSelf == false)
            {
                HeatTarget.gameObject.SetActive(true);
            }
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl    = new PhotonTransformViewScaleControl(m_ScaleModel);
        Controller        = this.GetComponent <bl_PlayerMovement>();
    }
Пример #10
0
#pragma warning disable 0414

    protected override void Awake() {
        base.Awake();

        if (!PhotonNetwork.connected)
            Destroy(this);

        //FirstUpdate = false;
        if (!this.isMine) {
            if (HeatTarget.gameObject.activeSelf == false)
                HeatTarget.gameObject.SetActive(true);
        }

        m_PositionControl = new PhotonTransformViewPositionControl(m_PositionModel);
        m_RotationControl = new PhotonTransformViewRotationControl(m_RotationModel);
        m_ScaleControl = new PhotonTransformViewScaleControl(m_ScaleModel);
        Controller = this.GetComponent<bl_PlayerMovement>();
        Settings = this.GetComponent<bl_PlayerSettings>();
        PDM = this.GetComponent<bl_PlayerDamageManager>();
        DrawName = this.GetComponent<bl_DrawName>();
    }
Пример #11
0
 /// <summary>
 ///
 /// </summary>
 void Awake()
 {
     PlayerController = PlayerRoot.GetComponent <bl_PlayerMovement>();
     PlayerCar        = PlayerRoot.GetComponent <bl_PlayerCar>();
     //  SetupSegments();
 }
Пример #12
0
 void Awake()
 {
     m_charactercontroller = base.transform.root.GetComponent <CharacterController>();
     m_movement            = this.transform.root.GetComponent <bl_PlayerMovement>();
 }