• This project
    • Loading...
  • Sign in

2020-1-capstone-design2 / 2014100522

%ea%b7%b8%eb%a6%bc1
Go to a project
Toggle navigation Toggle navigation pinning
  • Projects
  • Groups
  • Snippets
  • Help
  • Project
  • Activity
  • Repository
  • Pipelines
  • Graphs
  • Issues 0
  • Merge Requests 0
  • Wiki
  • Snippets
  • Network
  • Create a new issue
  • Builds
  • Commits
  • Issue Boards
  • Files
  • Commits
  • Network
  • Compare
  • Branches
  • Tags
Switch branch/tag
  • 2014100522
  • 프로젝트
  • NewAndFurious
  • Assets
  • Prefabs
  • ColorChange.cs
  • 신진수's avatar
    0610 프로젝트 제발 좀 푸쉬좀 되라 미쳤냐 · f06a5ee5
    f06a5ee5
    신진수 authored 2020-06-18 13:58:40 +0900
ColorChange.cs 460 Bytes
Raw Blame History Permalink
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28
using System.Collections;
using System.Collections.Generic;
using UnityEngine;

public class ColorChange : MonoBehaviour
{

    MeshRenderer mesh;
    Material mat;

    void Start()
    {
        mesh = GetComponent<MeshRenderer>();
        mat = mesh.material;
    }
    private void Update()
    {
        
    }

    private void OnCollisionEnter(Collision collision)
    {
        Debug.Log("충돌");
        mat.color = new Color(1, 0, 0);
    }

}