안녕하세요
간단하게 클리커 게임 개발중인데
<RelativeLayout
android:layout_height="match_parent"
android:layout_width="match_parent"
android:onClick="onClick"
android:clickable="true"
android:id="@+id/target">
<ImageView
android:layout_height="150dp"
android:layout_width="100dp"
android:src="@drawable/monster_01"
android:clickable="true"
android:layout_centerInParent="true"
android:id="@+id/monster"/>
<TextView
android:id="@+id/hp"
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:textColor="#FF0000"
android:layout_below="@id/monster"
android:layout_centerInParent="true"
android:layout_marginTop="35dp"/>
<ProgressBar
style="?android:attr/progressBarStyleHorizontal"
android:layout_height="wrap_content"
android:layout_width="match_parent"
android:progress="0"
android:max="1000"
android:id="@+id/fever"
android:layout_alignParentRight="true"
android:layout_alignParentBottom="true"
android:layout_marginLeft="10dp"
android:layout_marginRight="10dp"/>
<TextView
android:layout_height="wrap_content"
android:layout_width="wrap_content"
android:text="0"
android:textSize="15sp"
android:visibility="gone"
android:layout_above="@id/monster"
android:layout_centerInParent="true"
android:id="@+id/hit_damage"
android:layout_marginBottom="10dp"
android:gravity="center"
android:textColor="#000000"/>
<TextView
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:textAppearance="?android:attr/textAppearanceSmall"
android:text="0"
android:textSize="15sp"
android:visibility="gone"
android:layout_above="@id/monster"
android:layout_centerInParent="true"
android:layout_marginBottom="20dp"
android:gravity="center"
android:textColor="#3141D2"
android:id="@+id/hit_plusdamage"/>
</RelativeLayout>
모바일이라서 그런지 소스코드 올리는게 없네요..
아무튼 저렇게 지금 설정을 해두었는데요.
RelativeLayout이 클릭될 시 체력이 데미지만큼 떨어지게 구현을 한상태입니다.
현재 지정된 몬스터가 죽고 나면 체력&이미지를 갈아주고 클릭 > 맞는처리 까지 해주어야 하는 상태인데 이걸 어떻게 해야 할지좀 가르쳐 주시면 감사하겠습니다..
검색어를 뭐라고 쳐야할지도 모르겠고 답답 하네요 ㅠㅠ