New Sprites
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
using Assets.Scripts;
|
||||
using UnityEngine;
|
||||
|
||||
public class Door : MonoBehaviour,IDoor
|
||||
{
|
||||
[SerializeField]
|
||||
private Sprite _openDoor;
|
||||
|
||||
|
||||
public void OpenDoor()
|
||||
{
|
||||
//PlayOpenAnimation
|
||||
GetComponentInChildren<SpriteRenderer>().sprite= _openDoor;
|
||||
//Disable box collider
|
||||
gameObject.GetComponent<BoxCollider2D>().enabled=false;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
fileFormatVersion: 2
|
||||
guid: b3ead8e41e973dd43b93a8638ea30a36
|
||||
MonoImporter:
|
||||
externalObjects: {}
|
||||
serializedVersion: 2
|
||||
defaultReferences: []
|
||||
executionOrder: 0
|
||||
icon: {instanceID: 0}
|
||||
userData:
|
||||
assetBundleName:
|
||||
assetBundleVariant:
|
||||
Reference in New Issue
Block a user