Beispiel #1
0
 private void Awake()
 {
     controller     = GetComponent <CharacterController>();
     lampLight      = GetComponent <LampLight>();
     intangibleForm = GetComponent <IntangibleForm>();
     camera         = GetComponentInChildren <Camera>().transform;
 }
Beispiel #2
0
 internal static string ConvertLightToString(LampLight light)
 {
     return(light switch
     {
         LampLight.Red => "R",
         LampLight.Yellow => "Y",
         _ => "O"
     });
Beispiel #3
0
    /// <summary>
    /// Awake - first call
    /// </summary>
    private void Awake()
    {
        controller     = GetComponent <CharacterController>();
        lampLight      = GetComponent <LampLight>();
        intangibleForm = GetComponent <IntangibleForm>();
        camera         = GetComponentInChildren <Camera>().transform;

        audio = FindObjectOfType <AudioManager>();
    }
Beispiel #4
0
    void Start()
    {
        animator = ResetLeber.GetComponent <Animator>();
        //  renderer = PointLampModl.GetComponent<Renderer>();

        PointLamp_Renderer = new Renderer[PointLampModl.Length];

        //PointLamp_Material = new Material[PointLampModl.Length];

        //  alphaColor = new Color[PointLampModl.Length];

        for (int i = 0; i < PointLampModl.Length; i++)
        {
            PointLamp_Renderer[i] = PointLampModl[i].GetComponent <Renderer>(); //메탈릭
            //PointLamp_Material[i] = PointLampModl[i].GetComponent<Renderer>().material;
            // alphaColor[i] = PointLamp_Material[i].GetColor("MainColor");
        }

        lamplight = FindObjectOfType <LampLight>();

        bell_Doll.SetActive(false);

        //플레이어 move
        playerController = GameObject.FindObjectOfType <Player_HJ>();
        Side_Controller  = GameObject.FindObjectOfType <FirstPersonCamera>();
        _animator        = playerModeling.GetComponent <Animator>();


        lamp[0].SetActive(true);
        lamp[7].SetActive(true);
        lamp[1].SetActive(true);

        for (int i = 0; i < 8; i++)
        {
            lamp[i].SetActive(false);
        }

        lamp[0].SetActive(true);
        lamp[7].SetActive(true);
        lamp[1].SetActive(true);

        CheckOnL = 3;

        //외곽선
        OutlineController = GameObject.FindObjectOfType <DrawOutline_HJ>();

        //장애물,벽
        obstacleReader_script = GameObject.FindObjectOfType <ObstacleReader>();
        obstacle_layer        = (1 << LayerMask.NameToLayer("Light")) + (1 << LayerMask.NameToLayer("Obstacle"));

        //액션컨트롤러
        actionCtrler2_script = GameObject.FindObjectOfType <ActionController_02_VER2>();
    }
Beispiel #5
0
 public void OnTriggerEnter2D(Collider2D collision)
 {
     if (collision.gameObject.CompareTag("Lamp"))
     {
         Icon.SetActive(true);
         lamp = collision.GetComponent <LampLight>();
     }
     if (collision.gameObject.CompareTag("ZoomMin"))
     {
         Camera.GetComponent <Camera>().orthographicSize = Mathf.Clamp(Camera.GetComponent <Camera>().orthographicSize, minZoom, maxZoom);
     }
     if (collision.gameObject.CompareTag("ZoomMax"))
     {
         Camera.GetComponent <Camera>().orthographicSize = Mathf.Clamp(Camera.GetComponent <Camera>().orthographicSize + 1, minZoom, maxZoom);
     }
 }
Beispiel #6
0
 internal Lamp(LampLight colour, bool isSwitchedOn)
 {
     Colour       = ConvertLightToString(colour);
     IsSwitchedOn = isSwitchedOn;
     Light        = isSwitchedOn ? colour : LampLight.Off;
 }
Beispiel #7
0
 // Use this for initialization
 void Start()
 {
     player    = GameObject.FindGameObjectWithTag("Player");
     lampLight = GetComponentInChildren <LampLight>();
 }