Ejemplo n.º 1
0
 public UnReach(ImageDirction dirction = ImageDirction.UP)
 {
     image         = "Unreach";
     liitleMapImg  = "Unreach_littleMap";
     this.dirction = dirction;
     reach         = false;
 }
Ejemplo n.º 2
0
    public static void FlipGameObject(GameObject gameObject, ImageDirction dirction)
    {
        switch (dirction)
        {
        case ImageDirction.UP:
            gameObject.transform.localRotation = Quaternion.Euler(Vector3.zero);
            break;

        case ImageDirction.DOWN:
            gameObject.transform.localRotation = Quaternion.Euler(new Vector3(0, 0, 180f));
            break;

        case ImageDirction.LEFT:
            gameObject.transform.localRotation = Quaternion.Euler(new Vector3(0, 0, 90f));
            break;

        case ImageDirction.RIGHT:
            gameObject.transform.localRotation = Quaternion.Euler(new Vector3(0, 0, -90f));
            break;

        default:
            break;
        }
    }