private void Start()
 {
     if (script_pShot != null)
     {
         script_pShot = GameObject.FindGameObjectWithTag("player").GetComponent <player_shot>();
     }
     else
     {
         Debug.Log("From Drawing Player_Shot script wasn't applied");
     }
 }
Exemple #2
0
    private void Start()
    {
        //line = GetComponent<LineRenderer>();
        GameObject player_Check = GameObject.FindGameObjectWithTag("player");

        compo_Audio = GetComponent <AudioSource>();
        Loading_Effect_Obj.SetActive(false);
        script_pShot = player_Check.GetComponent <player_shot>();

        string tmp_char = "" + (char)92;
        string tmp      = System.Environment.GetFolderPath(System.Environment.SpecialFolder.MyDocuments);

        file_path = "file://" + tmp.Replace(tmp_char, "//") + "//Drawing_Capture.jpg";
    }
    /*float bobSpeed = 1.0f;
     * float stepCounter;
     * float bobAmountX = 0.1f;
     * float bobAmountY = 0.1f;
     * Vector3 lastPosition;
     * float heightRatio = 0.9f;
     * float aimingTrue = 1.0f;
     * float cameraDefault = 60.0f;
     * float targetCamera = 60.0f;
     * float cameraZoom = 1.0f;
     * float cameraZoomTo;
     * float cameraZoomSpeed = 0.1f;*/

    void Awake()
    {
        player           = GameObject.FindGameObjectWithTag("player");
        CurrentYRotation = transform.parent.rotation.eulerAngles.y;
        yRotation        = transform.parent.rotation.eulerAngles.y;
        Gun_X_Current    = GunObj.transform.localPosition.x;
        Gun_Y_Current    = GunObj.transform.localPosition.y;
        UiObj            = GameObject.Find("/Canvas");
        script_move      = transform.parent.GetComponent <FirstPerson_move>();
        script_grab      = transform.parent.GetComponent <player_grab>();
        script_RM        = transform.parent.GetComponent <player_RMfunction>();
        script_shot      = transform.parent.GetComponent <player_shot>();
        player_Cam       = GetComponent <Camera>();
        FOV_current      = player_Cam.fieldOfView;
    }
Exemple #4
0
    // Use this for initialization
    void Awake()
    {
        animation_controll    = hand.GetComponent <Animator>();
        script_Shot           = GetComponent <player_shot>();
        compoAudio            = GetComponent <AudioSource>();
        Identify_Effect_Sound = GameObject.Find("Repository_Obj").GetComponent <Repository_sprite_material>().identify_Effect_Sound;
        Image_SpRend          = new SpriteRenderer[Photo_Effect_Image_Obj.Length];
        for (int i = 0; i < Image_SpRend.Length; i++)
        {
            Image_SpRend[i] = Photo_Effect_Image_Obj[i].GetComponent <SpriteRenderer>();
        }

        Photo_Effect_All_Image = Resources.LoadAll("photo/Cnn_Photo_Effect", typeof(Sprite));
        if (Photo_Effect_Image_Obj.Length != Photo_Change_Delay_x01f.Length)
        {
            Debug.Log("From player_RMfunction 이미지 오브젝트 배열과 딜레이 배열 크기 불일치! 수정할 것");
        }
    }